4 ms·
Pedantically, yes, there is a fair bit larger set, but they really only get more and more esoteric (and often things that are allowed within the HTML syntax but
by gsnedders 4y ago
Pedantically, yes, there is a fair bit larger set, but they really only get more and more esoteric (and often things that are allowed within the HTML syntax but where the content would be non-conforming). For example:
You can have an element called "foo:bar" in HTML, but you can't in XML-with-Namespaces-in-XML; likewise, you can have an element called "a\u0300" in HTML, but you can't in XML (and the set of possible element names is even more different if you're looking at an implementation of XML 1.0 4th Edition, which most are, rather than the much later 5th edition).
You can't have a comment that contains "--" or ends with "-" in XML. (This is potentially the thing that comes up most often in real world content: people like doing <!------ DON'T TOUCH THIS ------>, which in HTML produces a comment whose value is "---- DON'T TOUCH THIS ----", which you cannot represent in XML.)