Re: <di>? Please?

04.02.2012, 04:31, "Lea Verou" <leaverou@gmail.com>:
> On 4/2/12 02:17, Marat Tanalin | tanalin.com wrote:
>
>> š04.02.2012, 04:15, "Lea Verou"<leaverou@gmail.com>:
>>> šOn 4/2/12 02:14, Marat Tanalin | tanalin.com wrote:
>>>> šššDIVs are disallowed as direct children of lists due to purely theoretical limitation while in practice they work.
>>> šExactly. That won't change, so I don't see what your problem is.
>>>
>>> š--
>>> šLea Verou (http://lea.verou.me | @LeaVerou)
>> šProblem is that this limitation is purely theoretical while working in real practice.
>
> It's a current limitation too. It won't be made *more* invalid, if
> that's even a thing :)
>
> Also, the same could be said for everything, even arbitrary elements.
> Should HTML just allow anything, anywhere, like XML?
>
> --
> Lea Verou (http://lea.verou.me | @LeaVerou)

DIV is not anything. It's _common_ (one of two: block-level DIV and inline SPAN) nonstructural HTML-container intended _solely_ to apply _styles_ to it, and nothing should prevent it to be used anywhere where another block-level element can be used.

For example, it's OK to disallow it as wrapper for PARAM elements inside OBJECTs (since PARAM elements are not visually rendered), but it should be allowed as direct child of lists as _semantically-transparent_ hierarchy-"layer" between _semantic_ UL/OL/DL and their _semantic_ descendants LI/DT/DD.

AFAIK, the limitation "list items must be direct children of list" has been invented long before common containers (DIV/SPAN) has been invented. So, while it was reasonable initially to disallow alien _structural_ children of lists (for example, H2 as direct child of UL would be semantically pointless indeed), it's currently unreasonable to disallow common containers as nonstructural children of lists.

Received on Saturday, 4 February 2012 13:37:54 UTC