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
962 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 ,


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,865 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
962 Points

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