[whatwg] Tag Soup: Blocks-in-inlines

Ian Hickson ian at hixie.ch
Thu Jan 26 14:49:27 PST 2006

On Thu, 26 Jan 2006, Lachlan Hunt wrote:
> Also, it may need some more improvement, I found an incredibly insane 
> condition that fails in Safari and another that fails a little in 
> Mozilla.
> <!DOCTYPE html>
> <em><p><span><h1>X</em>Y</span>Z</h1></p>
> Mozilla:
>   + EM
>   + P
>     + SPAN
>       + H1
>         + EM
>           + #text: X
>         + #text: YZ
> That look reasonably like what the author would want with that rubbish, except
> that the Z is within the span, but it's not in the markup.  If you swap <span>
> with <strong>, the result is even more perplexing, but the Z is not put within
> the STRONG element)

The result you get with a STRONG instead of the SPAN is I think what we 
should aim for. I believe I have come up with a way of describing an 
algorithm that results in this while still using the "adoption agency" 
approach. (Nice terminology!)

> Safari:
>   + EM
>     + P
>       + SPAN
>         + H1
>            + #text: X
>            + #text: Y
>            + #text: Z
> In this case, it's all emphasised, instead of just the X like it is in 
> Mozilla.  If you swap <span> with <strong>, the result is almost the 
> same, except there is an additional empty STRONG element added as a 
> child of the EM, after the P for no apparent reason.)

Yeah this seems wrong to me.

IE gets the result you describe as being what Mozilla does with STRONG. 
That's the rendering we should be aiming for, IMHO.

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