Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Basics Going Further with HTML Working on a Website Project Locally

Jessica Hunter
seal-mask
.a{fill-rule:evenodd;}techdegree
Jessica Hunter
Full Stack JavaScript Techdegree Student 13,097 Points

I changed the href from a root link, but it is still showing a list of files instead of navigating back to home.

From what I can see the code is the same as in the video:

  <li><a href="../../index.html">Home</a></li>
  <li><a href="../../index.html#about">About</a></li>
  <li><a href="../../index.html#articles">Articles</a></li>
  <li><a href="../../index.html#contact">Contact</a></li>
Sean T. Unwin
Sean T. Unwin
28,690 Points

A few basic questions to clarify:

You are:

  1. using the downloaded files or the Workspace and haven't moved any files within?
  2. editing article.html?
  3. saved article.html before viewing and refreshed the page?

3 Answers

Kevin Gates
Kevin Gates
15,053 Points

You're treating it like you would do in the command line. But I believe in HTML, relative links require you to go from the perspective on the base domain. So if you're on index.html then to go to "about", you actually only need to have href be "#about", since that is an on-page anchor tag.

If you wanted to go to the about page that is another page, then if your site is example.com, you would put: href="about"

As far as I can tell your code matches the video. I copy/pasted it into the workspace for the video and the links navigated like they should. Can you post a snapshot of your workspace? It is the camera icon in the upper right corner.

Marin Brkic
Marin Brkic
1,200 Points

I had the same problem. So I figured out i wrote #About in <nav> instead of #about and others too. If in main section is lowercase it has to be in <nav> too . " <main> <section id="about"> " .