The doctype declaration does not exactly match the meaning of the word.
There is no content that should exist outside the head and body (and in fact, any content that should be displayed should exist only inside the body ). However, browsers can create some pretty crazy DOMs when you give them weird or invalid markup. Here is an example.
In addition, head and body in this order are the only two possible children of the html , the root element.
source share