This test suite contains documents for testing XHTML support in browsers. Some of the test documents are correct while others are intentionally incorrect. Each document contains the same (possibly abridged) testing area.
The wording in the testing area is always the same (written to assume that the document should display) whether the document is correct or not. Please refer to the legend below to determine whether a particular test is supposed to work or whether it is intentionally incorrect.
Warning: Some of the tests will send your browser data in a format the browser does not expect. If your browser can’t deal with that kind of situation properly, you may experience a crash. If you don’t accept this risk, please do not load the test documents.
I left this suite as ”beta” on 2001-07-27, because the content type issues related to XHTML were unresolved and I had verified the validity of the tests only using tools that were originally designed to be used with SGML—not XML. As of 2002-05-05 the W3C has published a Note about the content type issue, but I haven’t yet had time to update the classification of the tests below to reflect the guidelines. Also, initial testing with XML validation tools suggest that some tests might not be valid if the documents are marked standalone as they are now.
Test name | application/xhtml+xml | application/xml | text/xml | text/html |
---|---|---|---|---|
HTML 4.01 Transitional (not XHTML) | Ill-formed | Ill-formed | Ill-formed | HTML |
XHTML Basic | XHTML | XML-XHTML | XML-XHTML | Soup |
XHTML 1.1 | XHTML | XML-XHTML | XML-XHTML | Soup |
XHTML 1.0 Strict in compliance with the HTML Compatibility Guidelines | XHTML | XML-XHTML | XML-XHTML | HTML |
XHTML 1.0 Transitional in compliance with the HTML Compatibility Guidelines | XHTML | XML-XHTML | XML-XHTML | HTML |
DTDless generic XHTML | XHTML-NS | XML-XHTML | XML-XHTML | Soup |
DTDless generic XHTML with “html” as the namespace prefix | XHTML-NS | XML-XHTML | XML-XHTML | Text |
DTDless generic XHTML with an arbitrary namespace prefix | XHTML-NS | XML-XHTML | XML-XHTML | Text |
DTDless generic almost XHTML with a wrong namespace (URL of the HTML 4.0 specification) | Text-NS | Text-NS | Text-NS | Soup |
DTDless generic almost XHTML with a wrong namespace (URL of the HTML 4.0 specification) and “html” as the namespace prefix | Text-NS | Text-NS | Text-NS | Text |
DTDless generic almost XHTML with an arbitrary namespace | Text | Text | Text | Soup |
DTDless generic almost XHTML with an arbitrary namespace and “html” as the namespace prefix | Text | Text | Text | Text |
DTDless generic almost XHTML without a namespace and with “html” as an undeclared namespace prefix | Text | Text | Text | Text |
Type | Description |
---|---|
XHTML | These are valid XHTML documents served as application/xhtml+xml. XHTML user agents are expected to display these documents with the XHTML semantics (subject to the capabilities of the user agent—eg. an XHTML Basic user agent isn’t expected to support XHTML elements beyond those included in XHTML Basic). Also XML user agents with support for the XHTML namespace are expected to display these documents with the XHTML semantics. |
XML-XHTML | These documents are served using either of the generic XML content types. XML user agents with support for the XHTML namespace are expected to display these documents with the XHTML semantics. |
XHTML-NS | These documents are served as application/xhtml+xml and use namespace features. The rules about what may be served as application/xhtml+xml and to what extent XHTML user agents are required to support namespaces are unclear at the time of writing. Hence, it is unclear how XHTML user agents should deal with these documents. If full namespace features are allowed, the user agents are expected to display these documents with the XHTML semantics. |
HTML | HTML user agents are expected to display these documents with the HTML semantics. |
Soup | Sending documents like this as text/html is wrong. However, HTML user agents that implement lenient HTML parsing are likely to display these documents with the HTML semantics. |
Text-NS | These documents have an improper namespace. Strictly speaking, user agents are supposed to only display a dump of the text content of these documents without the XHTML semantics. However, in practice some user agents will apply the XHTML semantics to these documents for historic reasons. |
Text | These documents shouldn’t have XHTML or HTML semantics applied to them. Instead, a well-behaved user agent is expected to only display a dump of the text content in these documents. If a user agent applies the XHTML semantics to these documents, the user agent is doing the wrong thing. |
Ill-formed | These documents are served using content types that imply XML parsing. However, the documents are not well-formed. A conforming XML parser should report an error and not process the document beyond the </head> tag. If a user agent displays these documents, the user agent is in serious error. |