
161
ADOBE GOLIVE CS2
User Guide
Document type definitions
Setting the document type definition
A document’s
doctype
, which is specified in the !DOCTYPE declaration at the beginning of the document, tells
HTML validators and browsers which Document Type Definition (DTD) to use when handling the document. The
DTD specifies the elements that are allowed in the source code and the attributes for each element. For example, the
HTML 4.0 Strict DTD doesn't allow frames in documents, and the XHTML Basic DTD doesn’t allow font elements.
By setting a document’s doctype, you are declaring that the document complies with a particular DTD, which some
devices now require. Some cell phones, for example, require documents to comply with the XHTML Basic DTD. If
you are designing a document for display on cell phones, be sure to set the doctype of the document to XHTML
Basic. Most current versions of browsers can display documents that are not compliant with the document’s declared
DTD. But, by setting the doctype and making sure the document is compliant, you are preparing the document for
future versions of browsers that will require compliance. If a document doesn’t have a doctype, which is the case for
most older documents, browsers can still display the document.
If you set a document’s doctype and then use the Syntax Checker, GoLive checks the document’s structure and syntax,
and then highlights any elements that are not compliant with the DTD declared in the doctype. (See “Validating the
syntax of source code” on page 591.)
Changing a document’s doctype
You can set a document’s doctype when you create the document in the New dialog box or change the doctype of
one or more existing documents. For example, you can change the doctype of an HTML document, or you can
convert a document from HTML to XHTML and then choose an XHTML doctype. For best results, start by creating
the type of special document you want to ultimately deploy.
After you choose a doctype, GoLive sets the document’s doctype by inserting or changing the !DOCTYPE decla
ration at the beginning of the document’s source code. The doctype you set is also selected as the default DTD in the
Syntax Checker.
To change the doctype of one document
The doctype is context-sensitive—that is, if you are editing an HTML document, the valid HTML DTDs are
available. For an XHTML document, the XHTML DTDs are available, and for any other doctype, the associated
DTDs in the Markup tab of Web Settings are available.
❖
In the Layout Editor, choose Doctype from the document window menu
, and then choose a doctype from the
menu.
Note:
If you associate imported DTDs with text or XML files in the Markup tab of Web Settings, those DTDs are also
available on the Doctype menu.(See “To import an XML DTD file” on page 645.)
To change the doctype of multiple files in a site
1
Open a site window.
2
Choose Special > Convert > Doctype and choose a group of files to convert from the Work On menu.
3
Choose a doctype from the New Doctype menu. If Write Full Doctype is available, select it to ensure that GoLive
includes a complete doctype with URL, and then click OK.
Summary of Contents for GOLIVE CS2
Page 1: ...Chapter 1 Copyright User Guide...
Page 251: ...ADOBE GOLIVE CS2 242 User Guide...