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
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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.