10 ms·
I see it uses <head> and <body>, which, in fact, are not required. Pages without them pass W3C validation without warnings.
by sbierwagen 16y ago
I see it uses <head> and <body>, which, in fact, are not required. Pages without them pass W3C validation without warnings.
- bradleyland 16y agoYes, but why are head and body not required? Just because a page validates without them does not make them superfluous in all cases.
- paulirish 16y agoFrom 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...