This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Validating a missing HTML tag The HTML sample is missing <html lang="en">. http://validator.w3.org/ This document was successfully checked as HTML5! <!DOCTYPE html> <head> <meta charset="utf-8" /> <title>Test</title> </head> <body> <section> <h2>Test</h2> </section> </body> </html>
Hi, The validator is behaving correctly. The HTML language allows the <html> start tag to be omitted. It always has, both in HTML4 and before, and still in HTML5. (XHTML requires it, but that's a different matter). For details, see the following section of the HTML5 spec - http://dev.w3.org/html5/spec-author-view/syntax.html#optional-tags "An html element's start tag may be omitted if the first thing inside the html element is not a comment." And, for the sake of comparison, see the following section of the HTML4 spec - http://www.w3.org/TR/html401/struct/global.html#edef-HTML Notice the part there that says, "Start tag: optional, End tag: optional".