Unit 6 Website Development - Tutorial 1
1.4 Use clear file names such as index.html, about.html and style.css
Learn how clear file names make a website easier to build, link and maintain.
Good File Names
Website file names should be short, clear and consistent. This makes it easier to create links and find the correct file later.
The homepage should normally be called index.html, because browsers and web servers often look for this file first.
Examples
| Good file name | Why it works |
|---|---|
index.html |
Clear homepage file name. |
about.html |
Clearly shows the page purpose. |
timetable.html |
Clearly shows when club sessions happen. |
style.css |
Clearly identifies the stylesheet. |
contact.html |
Easy to link to and understand. |
Naming Rules
- Use lowercase letters.
- Avoid spaces in file names.
- Use hyphens for longer names, such as
team-members.html. - Use the correct file extension, such as
.html,.css,.jpgor.png.
Build It Yourself
- Open the same
unit-6-websitefolder. - Check that the pages are called
index.html,about.html,timetable.htmlandcontact.html. - Check that the stylesheet is called
style.cssand is inside thecssfolder. - Rename any files that contain spaces, capital letters or unclear names.
- Check that each file has the correct extension.
Success Checklist
- Your homepage is called
index.html. - Your file names clearly describe their purpose.
- Your file names use lowercase letters.
- Your file names do not contain spaces.