In SGML, on the basis of which nominal HTML was based, up to HTML 4.01, an exclamation mark is part of the <! , which is the referenced concrete syntax for mdo, the markup declaration is open. Markup declarations are not markup elements, but, informally, declarations related to the elements. This includes document type declarations, comment declarations, and entity declarations.
There is no such general concept in the XML that XHTML is based on. Instead, a pair of <! just appears in some constructions without a single theory.
In HTML5, the HTML syntax was defined in a very special way, and the doctype line is called only as the doctype line - it has no role and does not matter except the expected effect of launching the "standard mode" (or the "non-quirks" mode) in browsers . In XHTML syntax, it has its own XML meaning.
Jukka K. Korpela
source share