2. Conformance Definition


This section is normative.

2.1. Document Conformance

This version of XHTML provides a definition of strictly conforming XHTML documents, which are restricted to elements and attributes from the XHTML namespace.

2.1.1. Strictly Conforming Documents

A strictly conforming XHTML 1.1 document is a document that requires only the facilities described as mandatory in this specification. Such a document must meet all the following criteria:

  1. The document must conform to the constraints expressed in Appendix C.

  2. The root element of the document must be <html>.

  3. The root element of the document must designate the XHTML namespace using the xmlns attribute [XMLNAMES]. The namespace designator for XHTML is "http://www.w3.org/1999/xhtml".

  4. There must be a DOCTYPE declaration in the document prior to the root element. If present, the public identifier included in the DOCTYPE declaration must reference the DTD found in Appendix C using its Formal Public Identifier. The system identifier may be modified appropriately.

     html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

Here is an example of an XHTML 1.1 document.

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    <title>Virtual Library</title>
    <p>Moved to <a href="http://vlib.org/">vlib.org</a>.</p>

Note that in this example, the XML declaration is included. An XML declaration like the one above is not required in all XML documents. XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16.

2.2. User Agent Conformance

A conforming user agent must meet all user agent conformance requirements defined in [XHTMLMOD].