Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You do know that the <body> tag is optional in HTML5? From MDN: The <body> tag “may be omitted if the first thing inside it is not a space character, comment, <script> element or <style> element. The end tag may be omitted if the <body> element has contents or has a start tag, and is not immediately followed by a comment.”

However, in this particular case the body starts with a space character, so it should have a body tag.

A minimal valid HTML5 document looks like:

    <!doctype html>
    <meta charset=utf-8>
    <title>blah</title>
    <p>I'm the content


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: