Validator does not catch certain types of invalid XHTML markup
Issue
When validating a page for valid XHTML 1.0 Strict markup (File> Check Page > Validate Markup > XHTML 1.0 Strict), Macromedia Dreamweaver fails to validate against all the rules as documented in the W3C XHTML specification.
Specific XHTML rules that Dreamweaver does not check for include:
- Documents must contain an XML namespace (
xmlns) in the<html>tag declaration. - There must be an XHTML DOCTYPE that references one of the three XHTML DTDs (XHTML Strict, XHTML Transitional, or XHTML Frameset).
- All image tags must have alt, height and width attributes.
- Attribute values must always be quoted.
Dreamweaver does correctly check against several of the criteria for valid XHTML, including the following:
- Overlapping elements are not allowed.
- Elements that need a containing element are not allowed outside the containing element.
- Element and attribute names must be in lower case.
- For non-empty elements, end tags are required.
- Empty elements must either have an end tag or the start tag must end with
/>. - Attribute minimization is not allowed.
Reason
Dreamweaver's XHMTL validator currently has some limitations as mentioned above. The product team is aware of these limitations and is looking into improving the XHTML validator for the next version of Dreamweaver. (Ref. 168472) The product team would like tohear from you if this issue is impacting your workflow.
Solution
Use W3C's Markup Validation Service as a final check to ensure your document is fully XHTML compliant.
Additional information
- The X(HTML) Files: Coding Standards Using XHTML by Dan Short
- W3C XHTML Specification
- W3C XHTML validator
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
