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

Understanding File Paths - articles link not working on my browser

When I use <a href="articles/article.html">Read more</a> , the redirect link on my preview shows "not found".

Is this the correct code or am I doing something wrong?

1 Answer

Hi Matador,

if the file "article.html" really is in the subfolder "article" and you are linking from "index.html" then your code is correct.

So check if the file really is IN the folder!

However in the video Guil is going further on also creating another folder called "2017" and putting the "article.html" inside of this folder... Then of course your link has to go to "articles/2017/article.html".

I assume you either have gone with him or if you have not created the subfolder "2017" yet then you have a spelling mistake somewhere. Maybe you have called your first subfolder "article" instead of "articles" or have not put your html file inside of the folder or... There are countless possibilities but I cannot know because have no access to your folder system.

So check carefully where your file is exactly. It is very easy to make a small mistake and when I started webdevelopment I remember I sometimes spend a lot of time figuring out these issues... ;-)

Good luck and happy coding!

Nils

PS: You can upvote my post and/or mark as "best answer" (at the bottom of my post) if it helped you in any way. :-)