[whatwg] Tag Soup: Blocks-in-inlines

I have to ask - why reopen the tags?  Why not throw them on the floor?  They're wrong anyhow and cause problems.  If bad code didn't (sort of) work, people would write different code.  That would be good.

IOW:
<em><p>stuff</em></p> looks like

Body
  +em
  +p
    +stuff



hyatt at apple.com wrote:

For example, allowing blocks inside inlines minimizes the number of residual style tags that you have to re-open, and deferring the reopening of such tags until a misnested close tag is encountered ensures that well- formed documents don't end up with a bloated DOM.  ...
Your DOM would grow unacceptably large on real-world pages if you try to restrict blocks from being inside inlines and end up reopening the inlines over and over again inside each block.

On Jan 25, 2006, at 5:41 PM, Ian Hickson wrote:

> On Wed, 25 Jan 2006, Simon Pieters wrote:
>>
>> Thus, <em><p>XY</p></em> should be parsed as:
>>
>> BODY
>>   + EM
>>   + P
>>     + EM
>>       + #text: XY
>>

Received on Wednesday, 25 January 2006 23:31:12 UTC