[whatwg] <div> as a wrapper for inline content

Ian Hickson ian at hixie.ch
Wed Jan 3 17:26:24 PST 2007

On Thu, 4 Jan 2007, Kornel Lesinski wrote:
> On Thu, 04 Jan 2007 00:58:34 -0000, Ian Hickson <ian at hixie.ch> wrote:
> > What's the use case for <div> elements containing inlines?
> From microformats.org:
> <div class="vcard">
>  <a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
>  <div class="org">Technorati</div>
> </div>

If that's an address:

   <p class="vcard">
    <a class="url fn" href="http://tantex.com/">Tantek Çelik</a> <br>
    <span class="org">Technorati</span>

But yeah, I see what you're saying...

Hmm. I guess we could say it is block-or-structured-inline-but-not-both, 
like most of the other elements. That still prevents things like:

     <p> ... </p>



...which are what I'm trying to avoid here.

> It can be generalized to "when <div> is used in place of elements with 
> inline content model and which are not in HTML." The simplest example 
> could be <div class="h7">.

<section><h1> handles that case.

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