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 trialJessica Hunter
Full Stack JavaScript Techdegree Student 13,097 PointsI 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>
3 Answers
Kevin Gates
15,053 PointsYou'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"
KRIS NIKOLAISEN
54,972 PointsAs 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
1,200 PointsI 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"> " .
Sean T. Unwin
28,690 PointsSean T. Unwin
28,690 PointsA few basic questions to clarify:
You are:
article.html
?article.html
before viewing and refreshed the page?