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

Michael Day mikeday at yeslogic.com
Wed Jan 18 22:30:28 PST 2012


Hi,

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?

Best regards,

Michael

-- 
Print XML with Prince!
http://www.princexml.com


More information about the whatwg mailing list