Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML HTML Basics Images, Text and Links Understanding File Paths

Struggling with the file paths.

I can't seem to get my file paths to work. Here is my code:

<a href="articles/2017/article.html">Read more</a>

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

Thank you

Steven Parker
Steven Parker
218,639 Points

This could be a file organization issue, but we need more information to replicate it. Take a look at this video about Posting a Question, and perhaps also this one about sharing a snapshot of your workspace.

2 Answers

Hello Steven, thank you for the suggestion. I took a snapshot of my workspace:

https://w.trhou.se/xg7nceo07g

Steven Parker
Steven Parker
218,639 Points

In the file index.html of the snapshot, the problem with the "Read more" code on lines 46 and 56 above is that the directory name "articles" is spelled with a lower-case "a" when the actual directory name is "Articles". On a case-sensitive filesystem (such as used in the workspaces), these names do not match.

Then in the file article.html of the snapshot, the reference to Home on line 14 is:

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

Notice that the prior directory references are composed of 3 dots, which is not correct. If you use 2 dots (as you showed above in the question) it should work.

Thank you so much Steven, it now works.

Steven Parker
Steven Parker
218,639 Points

Tamara Webster — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!