[whatwg] title/meta elements outside of <head>

Ian Hickson ian at hixie.ch
Tue Feb 7 16:24:45 PST 2012


On Thu, 19 Jan 2012, Michael Day wrote:
> 
> Currently the spec seems to indicate that title and meta elements found 
> in the body will stay where they are and not be added to the head.
> 
> However, if these elements occur after the head and before the body then 
> they will be added to the head.
> 
> Is this intentional?
> 
> Sample document #1:
> 
> <html>
> <head>
> </head>
> <body>
> <title>This will stay in the body</title>
> 
> Sample document #2:
> 
> <html>
> <head>
> </head>
> <title>This will be moved to the head</title>
> 
> Sample document #3:
> 
> <html>
> <head>
> abc
> <title>Now we are in the body, where this will stay</title>
> 
> What is the reason why title/meta elements are not always moved to the 
> head, regardless of where they appear?

On Thu, 19 Jan 2012, Henri Sivonen wrote:
> 
> They didn't need to be for compatibility, so we went with less magic. 
> Also, being able to use <meta> and <link> as descendants of <body> is 
> useful for Microdata and RDFa Lite without having to mint new void 
> elements.

Henri is correct.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list