Saving and Naming Web Page Files


Whether you create it with a template or from scratch, you need to save your new Web page file early and often.

When you save a file in Composer, you give it a namepresumably the name by which it will be stored on a Web server when published. And when it comes time to publish a Web page, names can be tricky. For example, Windows 98, Windows 2000, Windows Me, and even the Macintosh all allow you to use spaces and punctuation in filenames, but you should not do so when naming Web page files. Composer permits you to do it, but when you attempt to publish the files, you will find that browsers cannot open them.

In general, as long as you use a filename extension of .htm or .html and eliminate spaces and punctuation, you can give your page files any name you like. However, you can avoid certain kinds of compatibility problems by making sure that your filenames conform to the "8.3" filename rule: The filename must be no more than eight characters long with an extension of no more than three ( .htm , not .html ); for example:

 nedsnell.htm 

Also, when a page will be the "top" page of a multipage Web presentation, standard practice is to name it index.html (or index.htm ). Most Web servers are configured to open the file index.html automatically when a visitor specifies a Web site address or directory but not a specific file. However, this system works only if you have your own directory on the server. Usually, you will. But if you share a directory with others, odds are that you won't be the first to post a file named index.html , so the server won't accept your document. For this reason, sometimes you should choose your server (see Chapter 30, "Publishing Your Page") and find out about its naming guidelines before settling on final names for your HTML files.

graphics/lightbulb_icon.gif

When creating a multipage Web site, saving all the page files in the same folder on your PC is important. Doing so not only makes publishing easier, but it also simplifies other tasks , such as creating links between pages.

The best approach is to create a new, empty folder on your PC and store in it all the files that make up the siteincluding not only the HTML files, but also other files that come into play, such as picture files.

  1. Click the Save button on the Composition toolbar, as shown in Figure 18.6, or choose File, Save.

    Figure 18.6. Step 1: Click the Save button or choose File, Save.

    graphics/18fig06.gif

  2. Choose a folder in which to save the page file (see Figure 18.7). (To create a new folder to save in, click the Create New Folder button.) Then name the file as you would when saving a file in any Windows program and click the Save button.

    Figure 18.7. Step 2: Pick a folder and type a filename.

    graphics/18fig07.gif

  3. Enter a title for this page, as shown in Figure 18.8. (Don't feel pressured; you can always change the title later, as you learn to do in Chapter 19.)

    Figure 18.8. Step 3: Type a title.

    graphics/18fig08.gif

graphics/lightbulb_icon.gif

After the first time you save a file, you no longer need to perform Steps 2 and 3 when you save again. Simply performing Step 1 saves the file.



Sams Teach Yourself Internet and Web Basics All in One
Sams Teach Yourself Internet and Web Basics All in One
ISBN: 0672325330
EAN: 2147483647
Year: 2003
Pages: 350
Authors: Ned Snell

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