Dreamweaver generates new XHTML code and cleans up existing XHTML code in a way that meets most of the XHTML requirements. Dreamweaver also provides you with the tools that you need to meet the few XHTML requirements that remain.
Note: Some of the requirements described in this section are also required in various versions of HTML.
The following table describes the XHTML requirements that Dreamweaver meets automatically.
| XHTML requirement | Actions Dreamweaver performs to meet this requirement |
|---|---|
|
When the character encoding of a document is other than the default UTF-8, the document must have an XML declaration. |
Adds an XML declaration to an XHTML document and specifies the encoding; for example:
|
|
There must be a DOCTYPE declaration in the document prior to the root element, and the declaration must reference one of the three Document Type Definition (DTD) files for XHTML (strict, transitional, or frameset). |
Adds an XHTML DOCTYPE to an XHTML document:
Or, if the XHTML document has a frameset:
|
|
The root element of the document must be |
Adds the
|
|
A standard document must have the |
In a standard document, includes the |
|
All elements in the document must nest properly:
|
Generates correctly nested code and, when cleaning up XHTML, corrects nesting in code that was not generated by Dreamweaver. |
|
All element and attribute names must be lowercase. |
Forces HTML element and attribute names to be lowercase in the XHTML code that it generates and when cleaning up XHTML, regardless of your tag and attribute case preferences. |
|
Every element must have an end tag, unless it is declared in the DTD as EMPTY. |
Inserts end tags in the code that it generates, and when cleaning up XHTML. |
|
Empty elements must have an end tag, or the start tag must end with And for backwards-compatibility with browsers that are not XML-enabled, there must be a space before the |
Inserts empty elements with a space before the closing slash in empty tags in the code that it generates, and when cleaning up XHTML. |
|
Attributes can't be minimized; for example, This affects the following attributes: |
Inserts full attribute-value pairs in the code that it generates, and when cleaning up XHTML. Note: If an HTML browser does not support HTML 4, it might fail to interpret these Boolean attributes when they appear in their full form. |
|
All attribute values must be surrounded by quotation marks. |
Places quotation marks around attribute values in the code that it generates, and when cleaning up XHTML. |
|
The following elements must have an
|
Sets the |
|
For attributes with values of an enumerated type, the values must be lowercase. An enumerated type value is a value from a specified list of allowed values; for example, the |
Forces enumerated type values to be lowercase in the code that it generates, and when cleaning up XHTML. |
|
All script and style elements must have a (The |
Sets the |
|
All |
Sets these attributes in the code that it generates and, when cleaning up XHTML, reports missing |
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/dreamweaver/mx2004/using/22_codi7.htm