2 ms·
From a validation perspective you're totally right. But browsers are supposed to create HEAD and BODY elements if your markup doesn't include them. However som
by paulirish 16y ago
From a validation perspective you're totally right.
But browsers are supposed to create HEAD and BODY elements if your markup doesn't include them. However some do not: http://www.stevesouders.com/blog/2010/05/12/autohead-my-first-browserscope-user-test/ http://www.stevesouders.com/blog/2010/05/12/autohead-my-firs...
This means everyone's code that does `document.getElementsByTagName('head')[0]` will fail in some cases. Because that is rather risky, we decided to retain these optional elements..
The closing tags for </body> and </html> however...