4 ms·
Isn't doctype still required by the spec in HTML5 in order to be "proper"? Perhaps I'm mistaken but I thought I remembered that it's technically 'required'.
by cryptoz 2y ago
Isn't doctype still required by the spec in HTML5 in order to be "proper"? Perhaps I'm mistaken but I thought I remembered that it's technically 'required'.
- edflsafoiewq 2y agoIt enables quirks mode when missing.
- wild_egg 2y agoThe only elements that are absolutely required are doctype and a non-empty title. Most minimal valid HTML doc: <!DOCTYPE html> <title>Foo</title>
- sureIy 2y agoCorrect. Fun fact: you do not need to close most tags in a valid HTML5 document. This is valid: <!DOCTYPE html> <title>Foo</title> <p>paragraph <p>second <ul> <li>item </ul> <table> <tr><td>hi! </table>
- wild_egg 2y agoIndeed. People writing HTML5 as if it's XHTML is an old pet peeve of mine
- sureIy 2y agoIt is, but I'd argue that people wouldn't even notice that the document is in quirks mode. I think you'd really only want a TITLE tag so that it appears as a tab name. Anything else is really optional for people and you'd only really need BR, A, and IMG