[whatwg] Tree construction: link, base and meta in the "in head" insertion mode
Thomas Broyer
t.broyer at gmail.com
Thu Oct 11 14:10:16 PDT 2007
The algorithm says to "insert an HTML element for the token" when
encountering a start tag whose tag name is one of "meta", "link" or
"base"; but unlike other void elements, it doesn't say to "immediately
pop the current node off the stack of open elements", which means
following elements should be appended as children of the link, base or
meta element, not a sibling.
For reference, html5lib and Validator.nu's HTML Parser currently don't
use the "insert an HTML element" algorithm for these cases, they
instead use a special algorithm which doesn't deal with the "stack of
open elements" at all. HTML Parser uses its
"appendVoidElementToCurrentMayFoster" algorithm for every void element
while html5lib follows the "insert then pop" algorithm for these (img,
hr, etc)
--
Thomas Broyer
More information about the whatwg
mailing list