File Naming Conventions

Up until now, you've probably not had to think about how you named your files. When working on the web, different types of computers must work together. This means that certain conventions must be followed.


Be sure to follow these rules:

Pay attention when saving your files

Always remember to name your file appropriately. Also pay attention to where exactly you are saving your files.

Always use proper file extension suffixes when saving files

All files (even on a Mac) have a file extension suffix. Make sure when you save you file, that you are using the correct suffix.

Never use spaces in filenames

On a Mac or PC you can save a file called "my awesome website.html". This is illegal on a website and will not work. Use hyphens in your filenames instead to indicate spaces. Your file would be "my-awesome-website.html" instead.

Or you can simply avoid spaces altogether. "myawesomewebsite.html".

Avoid using underscores in filenames as well. Often times links are underlined and it can hard to see an underscore if the text is underlined.

Do not use special characters in filenames

Characters such as ?, %,#, /, :, ;, , etc are illegal. Only use letters, numbers, underscores, hyphens. Periods should only be used in the suffixes.

Filenames are case-sensitive

Assume that your filenames are always case-sensitive. Uppercase letters and lowercase letters are different. To avoid confusion, it is standard practice to always use lowercase letters.

Keep your files names short

Try not to make your files names really long. That being said, there is no need to make them so short that they are cryptic. For example, a page about you and what you are doing right now, you don't need to call it about-me-and-what-im-doing-right-now.html. At the same time, calling it a.html would be unhelpful. Simply naming the file about.html is sufficiently clear.