Hacker News new | ask | show | jobs
by wild_egg 614 days ago
The only elements that are absolutely required are doctype and a non-empty title. Most minimal valid HTML doc:

    <!DOCTYPE html>
    <title>Foo</title>
1 comments

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