JavaScript Resources

Filenaming Syntax for the Web

  • In order to view your page or any modifications that you make to it in a web browser, you must first save it.

  • It is important to save your HTML file as a text-only document. BBEdit, HomeSite, and SimpleText do this automatically. Other editors (such as MS Word, etc.) do not. If you are using one of these other editors, be sure to choose the correct format in the save dialog box the first time that you save.

  • Choose a filename that will distinguish it from other files as well as describe it for future editors.

  • The title of all folders and files should always be in lower case. This is not required, but it will save you a lot of frustration. Some web servers are case-sensitive. If you always use lowercase for your filenames and folders, you will never have to worry about case discrepancies between filenames and the hyperlinks that connect these files.

  • The name that you give for your file should end with an extension of ".html" or if you are using Windows 3.1 or earlier ".htm".

  • Never include white space characters in the name of a file or folder. The underscore character "_" however is permissible as a way of connecting words. For example:

    "my class.html" ... is a poor title.

    " myclass.html" ... is also poor, because it has leading white space.

    "myclass.html" ... is acceptable.

    "my_class.html" ... is also acceptable and the best way to separate words.

  • Never include special characters in the title of a file or folder, such as; ! , # & * ( < , etc. These characters often have special meanings for web servers and could cause your page to be displayed incorrectly or not displayed at all.

  • Never use more than one period in a file or folder title. The period separates the filename from the extension. The extension describes the type of file to the web browser, for example ".html" for a web page or ".gif" for a GIF image. If you include more than one period the web browser may not be able to determine the file type.