Folders and files structure

In this part of the master, we will introduce you to new terms used in the description of folders and HTML elements.

Note: a folder is also often referred to as a directory.

Site structure

Do not keep all files in the same folder. Even small sites are much easier to manage if you decompose HTML documents, images, and other resources into different folders, thus creating a specific layout of the different files. Structuring files as you want, you can choose a fairly flexible system of file organization, given that the site can grow, the file system will remain clear and understandable. The directory structure (hierarchy) in which the various files reside can usually be seen as a tree. Consider the following image as an example.

Directory hierarchy (folder tree)

As you can see, the structure is just a diagram showing the nesting of one directory into another. In the example, we used only three directories, but that would be enough to describe all the necessary information. Catalogs are often described using the terms of hereditary (family) relationships. We have a folder called Bananas, it is located inside the folder Fruit. The Fruit folder is the parent of the Bananas directory, and the Bananas Directory is a child (subdirectory) of the Fruit folder. Also we have another folder Pears, which is also a child of the catalogue Fruit.

To better remember, let's describe the terms separately:

Structure of elements

You can also represent the structure of elements as a diagram that shows the nesting of one element in another. Let's look at a simple example:


The diagram showing the nesting of elements can be represented as follows:

The hierarchy (tree) of elements in an HTML document

Copying materials from this site is possible only with the permission of the site administration and
when you specify a direct active link to the source.
2011-2018 © | ruen