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 Images, Text and Links Understanding File Paths

Can't get the link to Home tab in the articles.html to index.html

I think the file path is ok, an I don't see any syntax errors, so I'm not sure why it's not working.

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

Thanks!

https://teamtreehouse.com/workspaces/38333302#

3 Answers

Mark Tripney
Mark Tripney
6,009 Points

Hey Mia. You need to tell the browser to go 'up' two levels to access index.html. So, your code should read...

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

This is necessary because the page you're viewing is in its own folder (2017), so you need to get out of that (up once) and then out of another folder (Articles) in order to reach the root, where index.html resides. Hope that helps!

Thanks Mark!

Alexandra Cianciara
Alexandra Cianciara
2,465 Points

I have the same problem. I'm doing it exactly like you have it and it's not linking back:

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

Here is my worksheet. Can you please check

https://teamtreehouse.com/workspaces/38720062#

Mark Tripney
Mark Tripney
6,009 Points

Hey Alexandra. What does your folder structure look like? Do you have index.html in the 'root' and articles.html in a folder within the 'Articles' folder?