Goals
To understand how files are organized into directories.
Notes
A file is a lump o' data stored on some device, like a hard disk, a USB stick, or a DVD. Each file has a name, like "file.txt" or "this.jpg" or "This is a bad File Name. that is .Evil". The data in the file can be anything. Text, program instructions, image data, sound data, whatever.
Some files names are better than others. Use good names. Do not use evil names. Here are some rules to follow.
Lower case
For this course, make all file names lower case. Do NOT name files like this: "File.html". Name them like this: "file.html".
Say this out loud three times. Say it loud.
Make all file names lower case.
Make all file names lower case.
Make all file names lower case.
Now sing it to the tune of Happy Birthday. Like this. Do it!
One more time:
Make all file names lower case.
Oh, and one other thing. Make all file names lower case.
Spaces
Do not put spaces in file names. Do not put spaces in file names.
Now make a country song out of it. Like this.
Remember:
Do not put spaces in file names.
Special characters
Other than lowercase letters (a-z) and digits (0-9), the only characters you should use in file names are - (dash), _ (underscore), and . (period, dot, also called a full stop in civilized nations). Nothing else!
This is called the udda rule: underscores, dashes, and dots alone! Udda! Udda!
Now make a sermon out of it, like this.
Remember:
Underscores, dashes, and dots alone.
Extensions
Include an extension as the last part of every file name. The extension should tell you what type of data is in the file. Use standard extensions, like gif for GIF files and jpg for JPEG files. Use consistent extensions in your site. For example, files names like jack.jpg, jill.jpg, and hill.jpg. Not jack.jpg, jill.jpeg, and hill.jpeggy.picture. Use the extension .html, not .htm.
Use standard and consistent extensions. Use standard and consistent extensions. Use standard and consistent extensions.
Now be doin' some gangsta rap.
Use standard and consistent extensions.
Use directories
It is critical that you understand how files are organized into directories (folders and directories are the same thing.) If you don't understand this, you will have trouble throughout the course.
In particular, understand the difference between absolute and relative URLs. You should know how to make one file refer to another.
Here are some tutorials.
Windows file management tutorial
Create a new directory tree for every project. Make the structure of the tree match the structure of your site. Put stuff you use in many pages (like scripts, CSS files, images) into a directory called resources, library, or some such.
Use directories.
Make a story about directories. Like this.
Exercises
Find out why you should make all file names lower case.
Find a list of common file extensions on the Web, and what they mean.