HTML {html, head, body} Tags are Optional

The HTML's “html”, “head”, “body”, tags are all optional. This is a test page. View source.

However, the “DOCTYPE” and “title” are required.

Check validator.w3.org

However, it is not clear whether html5 requires them. See: http://dev.w3.org/html5/html-author/.

It says:

The html element is the root element of a document. Every document must begin with this element, and it must contain both the head and body elements.

In the HTML syntax only, both the start and end tags are optional, and so for convenience either may be omitted, unless you wish to specify attributes on this element, in which case, at least the start tag needs to be included.

It appears that the “html” tag is optional, but “head” and “body” are required.

Back to Xah's Web Dev Tutorial.