File Names


Like any other text document, a Web page has a file name that identifies itself to you, your visitors, and to your visitors' Web browser. There are a few tips to keep in mind when assigning file names to your Web pages that will help you organize your files, make it easier for your visitors to find and access your pages, and ensure that their browsers view the pages correctly.

Use lowercase file names

Since the file name you choose for your Web page determines what your visitors will have to type in order to get to your page, you can save your visitors from inadvertent typos (and headaches) by using only lowercase letters in your file names. It's also a big help when you go to create links between your pages yourself. If all your file names have only small letters, it's just one less thing you'll have to worry about.

Figure 1.14. Remember to use all lowercase letters for your file names and to consistently add either the .htm or .html extension. Mixing upper- and lowercase letters makes it harder for your visitors to type the proper address and find your page.


Figure 1.15. Use all lowercase letters for your directories and folders as well. The key is consistency. If you don't use uppercase letters, your visitors (and you) don't have to waste time wondering, "Now, was that a capital C or a small one?"


Use the proper extension

The principal way a browser knows that it should read a text document as a Web page is by looking at its extension: .htm or .html. If the page has some other extension, like say ".txt", the browser will treat it as text, and show all your nice code to the visitor.

  • Macintosh usersunless you're on a Mac server and all your visitors use Macsthis goes for you, too.

  • Windows folks, be aware that Windows doesn't always reveal a document's real extension. Change your Folder Options, if necessary, so you can see extensions.

  • Only people still on Windows 3.1 (all six of them) are limited to .htm. Practically everyone else can use either .htm or .html without problem. Just be consistent to avoid having to remember which one you used.




HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net