Directory Structure

Organizing Files and Folder Structure for Web Pages
It is a good idea to organize your code by placing the pages for each different section of the site into a new folder. Folders are referred to as directories on websites.

Diagram of the directory structure for a website called Example-Site.

The top-level is known as the root folder. (In this example is know as the root folder called examples-site.) The root folder is contains all the other files and folders for a website.

The relationship between files and folders on a website is described using the same terminology as a family tree.
The example-site folder is a parent of the activities, music and theater folders.
The  activitiesmusic and theater folders are children of the example-site folder.

The main homages of a site written in HTML is called index.html ( and the homepage of each section in a child folder).
Web servers are usually set up to return to the index.html file if no file name is specified.
Therefore, if you enter it will return, and will return

The root folder contains:

  • A file called index.html which is the homepage for the entire site
  • Individual folders for the activities, music and theater section of the site

Each sub-directory contains:

  • A file called index.html which is the homepage for that section
  • A review page called reviews.html
  • A listing page called listing.html6