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

On Sat, 30 Dec 2006, Henri Sivonen wrote:
>
> I suspect requiring the content model of <div> to be block only might be 
> an annoyance as far as a smooth upgrade path goes. Extremely superficial 
> anecdotal evidence suggests that even making the content model bimorphic 
> makes some Strict blogs not conform to an (X)HTML5 draft grammar.

Indeed.


> It seems to me that <div> is often used as an adapter that allows 
> DTD-valid Strict pages to put inline stuff where the DTD wants block.

Yes, it is used as a way to step around strictness requirements. It's a 
bug in HTML4 that people have been abusing, as far as I can tell.


> I can see why this might be unpleasant or inelegant, but do we really 
> want to annoy the potential early adopters who are now using such tricks 
> to make their pages valid as Strict? (The easy way to weasel out is, of 
> course, to state that a <div> that only has inline content constitutes a 
> paragraph. And, behold, paragraphs with struct-inline children become 
> possible in text/html as a side effect. :-)

It depends if by "early adopters" you mean people who just change the 
DOCTYPE, or people who actually switch to using the new elements. We have 
to balance making life easier for early adopters with making life better 
on the long run.

What's the use case for <div> elements containing inlines?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 3 January 2007 16:58:34 UTC