TIP 65: Adding and Changing DOCTYPEs


A DOCTYPEshort for document type declarationshould be included at the beginning of every page you create (Figure 65a). The DOCTYPE tells your visitors' Web browsers what flavor of HTML or XHTML you used to create your page and helps render the page accurately.

Figure 65a. Every page should have a DOCTYPE in the beginning of the source code.


Short vs. Long DOCTYPEs

By default, GoLive writes a short version of the DOCTYPE for HTML pages. It writes the short version because a long DOCTYPE (with the URL of the DTD) can cause problems in some browsers. Conversely, GoLive writes a long version of the DOCTYPE for XHTML pages.

To switch from one version of a DOCTYPE to another, hold the Option (Mac) or Alt (Windows) key and choose the DOCTYPE from the document flyout menu. This will switch an HTML DOCTYPE to the long version and an XHTML DOCTYPE to the short version.


Click the flyout menu in the upper right corner of the document window and select the appropriate DOCTYPE from the DOCTYPE menu (Figure 65b). If your page uses HTML, you can only select an HTML DOCTYPE; if it uses XHTML, you can only select an XHTML DOCTYPE.

Figure 65b. Choose the appropriate DOCTYPE from the document flyout menu. Notice you can also convert the markup of a page between HTML and XHTML using the document flyout menu. Choose Markup > Convert to HTML or Markup > Convert to XHTML as needed, and GoLive does the dirty work for you.




    Adobe GoLive CS2 Tips and Tricks The 250 Best
    Adobe GoLive CS2 Tips and Tricks The 250 Best
    ISBN: B008CMGJS0
    EAN: N/A
    Year: 2005
    Pages: 301

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