Saving and Naming your HTML File

Once you have typed the HTML, HEAD, TITLE, and BODY tags into a text-only document, you are ready to save your document and turn it into an official HTML file.

These instructions assume that you are using one of the approved HTML text-editors for this class, which all save documents automatically as ASCII/text-only files.

Note: If you are using a traditional word processor, such as Microsoft Word, Microsoft Works, or AppleWorks/ClarisWorks, you will need to save your document specifically as a text-only, ASCII, or HTML file from the Save As... choice in the File menu.

Warning: Traditional word processors are NOT recommended for HTML coding due to their tendency to add unnecessary information into a text file, or to substitute illegal characters into your code; they may, however, be used for general-purpose content generation in conjunction with an HTML-savvy text editor, once you are more familiar with the potential problems. For now, stick to one of the approved HTML text-editors.

Basic Instructions:

  1. Create an HTML page using the HTML, HEAD, TITLE, and BODY tags in a text-only document (again, if you are using one of the approved class HTML text editors, your document will automatically be in the correct format).
  2. "File/Save" or "File/Save As..." your HTML page.
  3. Before you can finish saving your HTML page, you must create a file name for your HTML page. This name should always end with the file extension ".htm" or ".html" to indicate that it is an HTML page. Type this file extension EXPLICITLY; don't expect or allow your text editor to do it automatically for you.
  4. Choose a specific folder or location on your hard drive where you wish to save your HTML page. Save it there.

I am assuming that every student taking this class is able to create folders on their hard drive, and save files to those folders (basic computer competence is a prerequisite for this class). If you are not certain how to do this, however, please contact one of our TA's, or eCollege's technical support.

Naming an HTML Page:

There are four rules governing the naming of HTML pages:

  1. NO SPACES IN THE NAMES!
  2. Always end the file name with ".htm" or ".html"
  3. Only use characters from a-z, A-Z, 0-9, and _ (underscore). All other characters (including commas, periods (except for the "dot" at the beginning of the dot-extension), tildes, exclamation points, etc) are considered reserved, and are therefore illegal.
  4. Always start the file name with a lower-case letter; no numbers or underscore characters are allowed as the FIRST character of the name (although you may use them anywhere else in the name).

We will discuss naming conventions, in depth, a little later in this module. Here are a few things to remember right now.

Your HTML file name MUST end with one of the following dot-extensions: either ".htm" or ".html". This is mandatory; otherwise, your HTML page will not operate correctly while you are editing it, nor will it be served correctly by the web server once you get it up on the Web. The most common dot-extension is ".html"; this is the standard on Unix and Macintosh systems. Windows 95/98/NT/2000 can also accept this four letter extension name, although older Windows machines prefer ".htm", the three letter extension (a holdover from the DOS underpinnings of the Windows operating system). Both conventions are acceptable on the Web. If you wish to follow the MOST common convention, always name your HTML files with the four-letter ".html" dot-extension.

Type the COMPLETE file name into the Save As... dialog box when saving your file, INCLUDING the .htm or .html extension. Many Windows users are accustomed to letting Windows applications add this dot-extension automatically, but this is not an acceptable practice. Some Windows applications will alter the spelling of the final file name if the complete dot-extension is not typed in when the HTML file is saved for the first time. For Macintosh and Unix users, of course, a failure to type in the dot-extension means that the file won't have the dot-extension as part of the file name, and the file will not operate correctly as an HTML page, on a local drive or on a web server. Remember: Unix and Macintosh applications do NOT automatically add the required dot-extension to ANY file name.

Example Acceptable File Names:

myPage.html
myPage.htm
index.html
this_page.html
default.html
my_cat.htm
laura.html

Non-Acceptable File Names:

my page.html (space in the name!)
1way.html (starts with a number!)
blueblood (no dot-extension!)
my~way.html (illegal character!)

Note to cross-platform users:

If you're going to be transferring a lot of files back and forth between older Mac and Windows machines using floppy disks or Zip disks, you'll want to stick to an even more restrictive naming convention: the DOS naming convention for files, called eight-dot-three (XXXXXXXX.XXX). This means that your file names should be restricted to eight letters (or less) dot the three letter extension (i.e. myname01.htm or goober.htm). Again, the first part of the name MAY be fewer than eight letters, but it may NOT be greater than eight letters. Remember, you must always include the .htm extension, and NO SPACES IN THE NAME! (Current Windows systems are still built on top of a DOS core, and some versions of the cross-platform file conversion utility built into the Macintosh automatically curtails Windows or Macintosh long file names to the DOS eight-dot-three file naming convention when saving onto or reading from a PC formatted disk. If you're transferring files over some kind of cross-platform network or over the Internet, you won't have to worry about this; this is only a problem when using floppies, Zips, or other removable media transferred between older Mac and Windows machines.)

Main Menu