HTML, XHTML, and CSS, Sixth Edition
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.
|
Категории