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

Linking back to index.html (home) page keeps returning an error from the 'article.html' page?

Linking back to index.html (home) page keeps returning an error from the 'article.html' page?

I have entered (so I think) the correct code/syntax to link back to the 'home' page (index.html).

What is the code you are writting?

4 Answers

I'm thinking it has something to do with your href value. If the article.html and index.html are in the same folder on the same level then you wont need the ../../index.html. Just try index.html in your href and see if that works.

You only use "path traversal" the dot dot slash when you are needing to move from the file that your original is.

Hope this helps.

Right. You're referring to relative paths in the same folder. I'm referring to the path being absolute, two folders outside. The reason I need the ../../ - You what...I think I just (typed) my way to the answer, lol. I'll get back. Thanks.

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

From the 'article.html' page.

Sorry,

<li></li>

Auto damn correct on my phone.