HTML HTML Basics Images, Text and Links Understanding File Paths

Hi, I can't link the Home tab in the articles.html to index.html. Is this code wrong?

<ul> <li><a href="../index.html"></a>Home</li> <li>About</li> <li>Articles</li> <li>Contact</li> </ul>

2 Answers

Steven Parker
Steven Parker
149,196 Points

Are the "articles.html" and "index.html" files in different folders? The "../" in front of the file name says the the file is in a parent folder. If that's not actually the case it could be the issue.

To facilitate more specific answers, you can make a snapshot of your workspace and post the link to it here.

Thank you for the response. I hope this is the way to do snapshot. But here is the link https://w.trhou.se/9efi3o644p

Steven Parker
Steven Parker
149,196 Points

Perfect snapshot! :+1: And the folder structure is correct for the link. But I overlooked before that the word "Home" is outside of the anchor tag, so it doesn't provide anything to click on. It was much more obvious when I tried it.

So move "Home" into the tag:

<a href="../index.html">Home</a>

Oh my gosh!! Thank you so much. I really did not notice that the Home is outside of the anchor tag. Still have to get used to watching these things really closely.