Jump to content

Simple HTML code doesn't work


axmug

Recommended Posts

Hi,

 

I am testing HTML code without any server and it doesn't work. Here is the code:

 


<!DOCTYPE html>
<html>
<head>
<title>Home Page</title>
<body>

<h1>My site</h1>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec iaculis posuere justo. Nam vel neque. Proin sagittis mauris sit amet nisl. Sed ipsum. Aliquan vitae
justo.

<h2>Latest projects</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat. Aliquam dui ligula, porttitor eu, facilisis vitae,
ornare sed, tortor.<br><br>
<a href="../Portfolio/index.html">Site Projects</a>

<body>
</html>

 


<html>
<head>
<title>Links</title>
<body>

<h1>Latest projects</h1>
<a href="../index.html">Home page</a>

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec iaculis posuere justo. Nam vel neque.

<h2>Project 1</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat.<br><br>
<a href="/images/Project1.jpg">Image project 1</a>
<h2>Project 2</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat.<br><br>
<a href="/images/Project2.jpg">Image project 2</a>
<body>
</html>

 

When I run the Home Page code in Firefox, I can watch all the information correctly, but when I click on Site Projects link Firefox remains in the same page.

 

How can I change to the Links page? I have this one in root folder on my computer and the other one in the Protfolio folder also in my computer.

 

Thanks.

 

 

Link to comment
https://forums.phpfreaks.com/topic/268362-simple-html-code-doesnt-work/
Share on other sites

Problem solved. I only changed

<a href="../Portfolio/index.html">Site Projects</a>

to

<a href="/Portfolio/index.html">Site Projects</a>

in home site and

<a href="/images/Project1.jpg">Image project 1</a>

to

<a href="../images/Project1.jpg">Image project 1</a>

in Links site.

I changed the same in Image project 2 link.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.