B1262L
B1262L

Reputation: 21

HTML links not working

I created my first website uploading the first two pages including the first and main page and then a second page that the first page links to. Before doing so, a link that when clicked on, takes me correctly from my main page to a second page worked. After uploading it on 000webhost.com it no longer worked. Meaning, I can view my main page but when I click on the link that should take me to my second page, it doesn't do anything. Here is the code that was and is still included in my main page for the link that should take me to my second page. I have a feeling that it has something to do with the protocol and that I have to make changes to it but not sure what changes to correctly make so the link will work. I used a sub domain at 000webhost.com not my own. Here is the code that was and is on my main page:

<li><a href="file:///C:\Users\Brian\Desktop\Noah\NoahsFirstDay.html">Noah's First Day</a></li>

Upvotes: 1

Views: 400

Answers (1)

Mureinik
Mureinik

Reputation: 312116

The link points to a file on your computer (note the file:// prefix). The best practice is usually to have links to your own pages in relative form. So, for example, assuming you uploaded all the files to the same directory, just use the filename itself:

<li><a href="NoahsFirstDay.html">Noah's First Day</a></li>

Upvotes: 1

Related Questions