Hacker News new | ask | show | jobs
by cryptoz 612 days 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'.
3 comments

The only elements that are absolutely required are doctype and a non-empty title. Most minimal valid HTML doc:

    <!DOCTYPE html>
    <title>Foo</title>
Correct.

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>
Indeed. People writing HTML5 as if it's XHTML is an old pet peeve of mine
It 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

It enables quirks mode when missing.