HTML “html”, “head”, “body”, Tags Are Optional?

Perm url with updates:

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.


However, it is not clear whether html5 requires them. See:

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.

Popular posts from this blog

Browser User Agent Strings 2012

11 Years of Writing About Emacs

does md5 creates more randomness?