You can't. That's invalid HTML, and since the
<html> start tag and the
</html> end tag (plus those for head and body) are optional, browsers will interpret that as,
The 'outer' HTML element is the document root element, so my code would still work.
There can't be anything 'around' the HTML element. You can have a doctype declaration, SGML comments and, in theory at least, processing directives outside the HTML element, but nothing can wrap around it.
This doesn't apply for XHTML served as an application of XML, but it does apply for HTML – including pretend-XHTML served as