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

At video 2:20, how did the article's folder suddenly become the child directory or subdirectory of the root folder?

How did the article folder became the child directory, when if you are looking at the file tree, it's location is above the article.html. Is it not the article.html is supposed to be the child directory if we look at the file tree? And the articles folder is the root or parent directory?

3 Answers

Shay Paustovsky
Shay Paustovsky
969 Points

Hi Web Pad,

A confusion at the beginning is always normal because I myself haven't understood it completely on the first time but the idea is fairly simple.

The "HTML Basics" folder is the root directory because it holds all the files of the websites. The "Articles" folder as mentioned is a child folder of the root folder (HTML BASICS), but it is the parent of the (INDEX.HTML).

So when a file/folder is nested inside another folder it creates a parent-child relationship where the nesting folder is the parent and the nested file(s)/folder(s) are children of the parent.

Hope this helps

Happy Coding ,

Shay

Oh my gosh, thank you so much for the clarification!!. I wasn't expecting the HTML BASICS is after all the root directory!! It makes sense now. I was really confused as to which one in the file tree is the root directory. Thank you!!

Antonio De Rose
Antonio De Rose
20,884 Points
<!--I am a little confused with your question, but, would mention, what Guil is trying to explain
initially, the files are all in one master folder, given you are in index.html, if you are to access, the
articles.html file, it would be like below-->

<a href="articles.html">articles.html</a>

<!--now that there had been a folder created for html files, and the file articles.html
goes into the articles folder, it should be like, one level down from the
above example-->

<a href="articles/articles.html">articles.html</a>

<!--2 levels down-->

<a href="2017/articles/articles.html">articles.html</a>

<!--if you are now in articles page, and want to go access index.html page, there
will have to be tweak, to be made, that being, to come 2 folders out to access the index page-->

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

Thank you!! These are so new to me, taking a while for me to grasp.

Shay Paustovsky
Shay Paustovsky
969 Points

You're Welcome always glad for help. If the answer helped you make sure to mark the 'best answer' for others.