Re:The minimal code required in a HTML5 page
by mathias on Monday February 20, 2012 @01:15AM
(#3611501)
Note that `<title>` is optional in a few edge cases. This post has a more in-depth explanation: http://mathiasbynens.be/notes/minimal-html
If you're talking about the minimal valid code for an independent web page, it is:
The title element is required, and is not automatically inserted if the tags are missing the way <html>, <head>, and <body> are.If you're talking about the minimal thing the browser will parse, you can provide an empty document (with Content-type: text/html), and the browser will treat it as if it's an HTML document, generating the appropriate elements automatically. It will parse it in quirks mode, but if you don't care about validity, and are talking about an empty document, that doesn't matter much.
If you're talking about what you can embed in <iframe srcdoc>, again, an empty document is acceptable. In that context, the doctype and title are both optional.