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

Jeremy Custer
Jeremy Custer
3,050 Points

HTML Basics: file path not working <a href="articles/2017/article.html">

I have my file path just like the instructor has it in the video, but when I click preview page and click the link, no URL is found on the server. I do have the 2017 folder nested in the articles folder with the article.html file in the 2017 folder. Help please! lol

1 Answer

Hi, I'm just an intermediate, so if there are any experts out there and I am incorrect, please jump in.

The link "articles/2017/article.html" in the video is not an absolute link to an external website, but is instead an internal link to a folder within the instructor's computer. Therefore, unless you create yourself a folder in your computer with the path "articles/2017/article.html", the instructor's internal link should not work at your end. In other words, the instructor seems to be assuming that a file with t he path "articles/2017/article.html" exists on his computer or website and is thus using an internal link to it. In contrast, an absolute link includes "http://www. bla bla bla.com etc". If it were an absolute link, then it is expected that it would work for you.

This is a good question and I hope you now understand.

Jeremy Custer
Jeremy Custer
3,050 Points

Thanks for your input on my question post. I understood what you were saying and the next two videos in the section explained more in depth what you were talking about. Turns out that the way I dragged the article.html file to the folder 2017 wasn't actually in the folder, but in the side menu, it looked like it was. After re-dragging it, it fixed the file path and the article.html file worked and displayed properly. Thanks!