University of Malta  WWW WORKSHOP 

Website Organisation:
Directory Structure


Directory Structure

The design of a website involves not only the creation of individual pages, but a structure that pages can inhabit. In order to ensure that the collection of pages may grow in a controlled way, it is worthwhile investing some effort towards a sound design for such a structure.

The principle structuring device available to the html author is the directory. Directories may contain files or subdirectories. Use of the latter immediately provides a kind of hierarchy, as seen in the following diagram of structure underlying this course:

Note first of all that the main directory mainly contains subdirectories, each of which is devoted to a conceptually separate aspect of the course, hence: one directory for each session, another for the description, another for images, etc.

Note also that there are two files: links.html and index.html. The first is simply a file that happens contain a list of links that are pertinent to the course. The other file is a bit more special for two reasons.

  1. It contains the course home page. This is important for the course, but it is also important for the directory to have a single file which acts as a kind of entry point to its contents, much as a store guide shows a client where to find items in a supermarket.
  2. It is called "index.html". Servers are usually set up so that if asked for a directory rather than a file, they will automatically look for a standard filename in that directory. The most widely used standard name is "index.html"
So it is highly recommended to always provide an index.html for each directory!.

Course Home CSC Home Resources Session 2 Session 4

Mike Rosner (mros@cs.um.edu.mt)

Last modified: Fri Feb 26 16:31:59 1999