<D <M <Y
Y> M> D>

[Comments] (10) : Is this valid HTML?

<!  DOCTYPE HTML PUBLIC...

That is, as opposed to:

<!DOCTYPE HTML PUBLIC...

More generally, is it okay to have whitespace between the <! that begins a declaration and the actual name of the declaration? The W3C validator says it's fine, and I couldn't find anything in the standard about it, and the general SGML-based-language attitude towards whitespace is "whitespace is all in your head, maaaaan." However, there are intimations on various webpages that it's invalid, and the Python HTML parser chokes on it (this is a leading cause of complaints against Beautiful Soup). I have a fix for the Python HTML parser but before I put all the effort into making sure it doesn't break anything else I'd like to know if it's even something that's "supposed" to work.


[Main]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.