How things change. These days, I have ceased considering what makes a document conforming or nonconforming by its Document Type Declaration. Documents are conforming or documents are nonconforming. Occasionally, they’re each. A conforming HTML 4.01 document may be a conforming XHTML 1.0 document. Conversly, a nonconforming XHTML 1.0 document may be a conforming HTML5 document.
Ian Hickson offered the following in reply [June 17, 2007] to an W3C HTML WG message, Allow other doctypes.
Conforming HTML4 and XHTML1 docs will not become non-conforming HTML4 and XHTML1 docs. They'll remain conforming HTML4 and XHTML1 docs. They won't be conforming HTML5 docs because they aren't HTML5 docs in the first place. I don't see this as a problem.
HTML 4.01 or XHTML 1.0 document content which is found nonconforming with the (X)HTML5 Conformance Checking Service
may be made HTML5 conforming and—after DocType replacement—pass. Presently, conforming HTML5 documents that have not included undefined W3C elements, e.g., <header> will pass W3C Markup Validation (except for the various Document Type Declaration and Charater Set requirements).
I thought about what constitutes failure and acceptance between HTML 4.01, XHTML 1.0 and HTML5. It’s content.
I did some simple test cases.
HTML 4.01/Strict Passed W3C Markup Validation
The actual markup,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>HTML5 - HTML 4.01 Strict Passes W3C Markup Validation</title>
</head>
<body>
<p>This is a sentence with an XHTML <code><br /></code> in a <br />paragraph.</p>
<p>This is a sentence with an image <img src="http://www.elementary-group-standards.com/images/elementary-theory-rosette.jpg" >
alt="Elementary Rosette" /> with an XHTML <code><img /></code> in a paragraph.</p>
</body>
</html>
XHTML 1.0/Strict Passed W3C Markup Validation
The actual markup,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>HTML5 - XHTML 1.0 Strict Passes Markup W3C Validation</title>
</head>
<body>
<p>This is a sentence with an XHTML <code><br /></code> in an <br />paragraph.</p>
<p>This is a sentence with an image <img src="http://www.elementary-group-standards.com/images/elementary-theory-rosette.jpg" >
alt="Elementary Rosette" /> with an XHTML <code><img /></code> in a paragraph.</p>
</body>
</html>
HTML5 Passed (X)HTML5 Conformance Checker
The actual markup,
<!DOCTYPE html>
<html>
<head>
<title>HTML5 - HTML5 Passes HTML5 Conformance Checker</title>
</head>
<body>
<p>This is a sentence with an XHTML <code><br /></code> in a <br />paragraph.</p>
<p>This is a sentence with an image <img src="http://www.elementary-group-standards.com/images/elementary-theory-rosette.jpg" >
alt="Elementary Rosette" /> with an XHTML <code><img /></code> in a paragraph.</p>
</body>
</html>
XHTML well-formed self-closing elements are acceptable in HTML 4.01 (as illustrated in the first test case). However, some things are not what they seem.
HTML 4.01/Strict (Second Test) Failed W3C Markup Validation
The actual markup,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>HTML5 - HTML 4.01 Strict Fails W3C Markup Validation</title>
</head>
<body>
<p>The Content-Type is <code><meta http-equiv="content-type" content="text/html; charset=utf-8" /></code></p>
<p>This is a sentence with an XHTML <code><br /></code> in an <br />paragraph.</p>
<p>This is a sentence with an image <img src="http://www.elementary-group-standards.com/images/elementary-theory-rosette.jpg" >
alt="Elementary Rosette" /> with an XHTML <code><img /></code> in a paragraph.</p>
</body>
</html>
So. XHTML well-formed self-closing elements in the meta:elements are not acceptable in HTML 4.01. That’s odd.
XHTML 1.0/Strict (Second Test) Failed W3C Markup Validation
The actual markup,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>HTML5 - XHTML 1.0 Strict (Second Test) Fails W3C Markup Validation</title>
</head>
<body>
<p>This is a sentence with an HTML <code><br></code> in a <br> paragraph.</p>
<p>This is a sentence with an image <img src="http://www.elementary-group-standards.com/images/elementary-theory-rosette.jpg" >
alt="Elementary Rosette" /> with an XHTML <code><img /></code> in a paragraph.</p>
</body>
</html>
And, HTML empty elements are not acceptable in XHTML 1.0. That makes sense. XHTML well-formedness requirements require empty elements to be self-closed whereas the HTML 4.01 specification makes no mention of well-formedness which thereby allows W3C Quality Assurance to have corrected their Validation Service so that at this moment it accepts self-closed XHTML elements in HTML 4.01. However, it passes (X)HTML Conformance Checker.
The above test cases are very simple. Still. They illustrate that it is possible to have content which meets HTML 4.01, XHTML 1.0 and HTML5 validation reqirements; and, when the appropriate DocTypes are used, one has three conforming documents. However, for all this theory, it appears HTML5 has an interesting present-day Conformance Checker loophole: some nonconforming XHTML 1.0 will pass as HTML5 whereas nonconforming HTML 4.01 shall not.
And, HTML 4.01 Markup Validation accepts XHTML well-formed empty elements.
Things are changing.

