The root directory contains your website files
In the previous lesson you learnt that a website is comprised of, at the minimum, a CSS file and an HTML file. However, your first website will have two HTML files, and it will have some images as well. One of the HTML documents will be your home page. The other will be your first page of content. (Later on, when you wish to add more content pages, you can use this one as a template.)
And where will these files be kept? In the 'root' directory of course!
- Decide where to keep your website files.
- Create a directory (folder) in the selected location. Name it 'root'.
- Create two directories within the root directory. The first is for the content page (and any to follow later); call it 'pages'. The other is for the images; call it 'images'.
Use your text editor to create the three text documents:
- CSS file: Open a new text file and save it in the root directory. Name it 'mystylesheet' and save it using the '.css' file extension (i.e. mystylesheet.css). This is your style sheet, but for now it's just a blank document. Close it.
- Home page HTML file: Open another new text file in the root directory. Name it 'home' and save it using the '.htm' file extension (i.e. home.htm). (In the list of file types, it may be listed as 'hyper text markup language'). For now it is just a blank document. Close it.
- Content page HTML file: Open another new text file. Save it in the 'pages' directory as 'content.htm'. This is the first page of general content. For now it's just a blank document. Close it.
- Looking in the root directory, you should see two directories and two text files. One of the text files should have an 'htm' file type and the other a 'css' file type. In the 'pages' directory you will see the third text file, 'content.htm'.