W3C home > Mailing lists > Public > public-html@w3.org > March 2010

Re: restrictions on blocks inside inlines (was Re: HTML5 Authoring Conformance Study)

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 21 Mar 2010 13:11:35 -0700
Cc: HTMLwg WG <public-html@w3.org>
Message-id: <526C998E-56EE-49E4-91BC-17D62248D90E@apple.com>
To: "L. David Baron" <dbaron@dbaron.org>

On Mar 21, 2010, at 9:14 AM, L. David Baron wrote:

> On Sunday 2010-03-21 08:22 -0400, Sam Ruby wrote:
>> youtube.com:
>> What interop issues are solved by disallowing div elements inside of
>> span elements?
> Blocks inside inlines can, in some cases, cause larger numbers of
> CSS boxes to be present than the author probably expects, which I
> believe in some cases causes performance degradation.  (I've seen
> cases in the past where such performance degradation was
> significant, although those cases may have been fixed in our
> implementation.)
> In many cases, the author intends the outer element to have block
> formatting.  In the other cases, I believe the resulting formatting
> is non-tree-like, which confuses the mental model of the HTML
> element structure representing a tree.

Good point. Blocks inside inlines create a very strange render tree  
and this can have unexpected side effects. I have had to help web  
developers at Apple with problems resulting from this a couple of  
times. On the other hand, HTML5 allows nesting block-level elements  
inside the <a> element. Perhaps in that case the benefits exceed the  

(Note for Leif: neither <caption> nor the <hn> elements are inlines.)

Received on Sunday, 21 March 2010 20:12:14 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:13 UTC