Naming
Your Files
Improper
filenames can cause pages on your Web site to display incorrectly,
or even not to display at all!
Here are four items you should keep in mind when naming
the files on your Web site:
- The
most important thing to remember when managing filenames
is consistency. For instance, your HTML
files can end in either
.htm
or .html . Pick
the ending you like better and use it for all your HTML
files. That way, you won't accidentally link to photos.htm
when the file is really photos.html .
- Case
matters! If you name a file
PHOTOS.HTM
or Photos.htm ,
you cannot access it under the name photos.htm .
As a general rule, it is easiest to use all lowercase
letters in naming your files. Not only does it mean you
don't have to waste the energy needed to press the Shift
key, but it also gives your filenames consistency.
- In
naming your files, you should only use letters (A-Z, a-z),
numbers (0-9), periods (.) and underscores (_). NEVER
use a space in a filename--even though Windows allows
you to use spaces in file names, our Web servers do not.
So the filename
photo album.html
will not work! Instead of the space, use an underscore:
photo_album.html .
- Your
home page must be named one of the following:
index.html ,
index.htm , main.html
or main.htm .
Some Web hosts use default.html
or home.html ,
so if you are transferring your site from another host,
you may need to change the filename for your home page.
|