W3C home > Mailing lists > Public > public-html@w3.org > November 2007

Whitespace before <head>

From: Simon Pieters <simonp@opera.com>
Date: Wed, 14 Nov 2007 18:59:58 +0100
To: public-html <public-html@w3.org>
Message-ID: <op.t1smx8nxidj3kv@hp-a0a83fcd39d2.palace.opera.no>

It appears that some sites use document.documentElement.firstChild and  
expect it to be the head element even if there was whitespace before the  
<head> tag.

Safari seems to drop whitespace before the <head> tag. Firefox seems to  
insert any whitespace before the <head> tag in the head element, even if  
it was also before the <html> tag or before the doctype, and it also does  
so with comments. IE seems to drop whitespace and put comments before the  
<html> tag as siblings to the root element and after as children of the  
head element. Opera currently does what HTML5 says, and it has caused some  
compat problems.

-- 
Simon Pieters
Opera Software
Received on Wednesday, 14 November 2007 18:00:15 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:23 UTC