2 ms·
It’s valid to omit </html> (<html> too, for that matter).
by minitech 8y ago
It’s valid to omit </html> (<html> too, for that matter).
- naniwaduni 8y agoThe idea is to have the mangler see </html> and inject their garbage right above it--into a comment. Unrelatedly, <html> is surprisingly hard to omit if you want to properly set the lang attribute.
- abdusco 8y agoAny element can accept `lang` attribute, though. You can put it on the `<body>` element, but it wouldn't be as "proper". https://www.w3.org/International/questions/qa-html-language-declarations#basics https://www.w3.org/International/questions/qa-html-language-...
- naniwaduni 8y agoIt's actually pretty easy to omit <body> (and <head>), so you don't gain anything from this anyway, either.
- megous 8y agoYou can omit the closing tag.
- jszymborski 8y agoHmpf, didn't know that, thanks! Very strange, however.