[whatwg] Embedding Elements Should be Structured Inline-Level

Andrew Fedoniouk news at terrainformatica.com
Wed Mar 14 00:35:07 PDT 2007


----- Original Message ----- 
From: "Lachlan Hunt" <lachlan.hunt at lachy.id.au>
To: <whatwg at whatwg.org>
Sent: Tuesday, March 13, 2007 9:23 PM
Subject: [whatwg] Embedding Elements Should be Structured Inline-Level


> Hi,
>   The spec currently defines most embedding elements (img, iframe, embed, 
> object, video and canvas) as strictly inline level and thus only allows 
> them to be used in contexts where strictly inline level content may be 
> used.
>
> I think these elements should be defined as structured inline-level 
> elements.  When used in block level contexts, they should represent 
> paragraphs.
>
> The specific use case I have come across which requires this is something 
> like the following.  (Although, the site I'm currently building is HTML4 
> and using <div id="header"> instead.)
>
> <header>
>     <h1><img src="/images/logo" alt="Company Name"></h1>
>     <object data="flash"></object>
> </header>
>
> In this particular case, it doesn't make sense to add an extra <p> or 
> <div> around the object just to get around the contextual usage 
> restriction.
>
> HTML4 currently allows object and iframe to be used where block level 
> elements are allowed, and I don't think HTML5 should restrict that.
>

I would add to the list also <select type="list">, <textarea>, <richtext> -
all active elements that are mutiline by their nature.

But I am not sure about "HTML4 currently allows object and
iframe to be used where block level elements are allowed".

AFAIR there is no mechanism that allows to switch %flow nature
(display-model in CSS3) of the elements in HTML.

It would be nice to have something that will tell parser what
are these object: inlines or blocks so it can produce optimal
rendering structure.

Andrew Fedoniouk.
http://terrainformatica.com







More information about the whatwg mailing list