[whatwg] [html5] DI element

Dean Edwards wrote:
> Matthew Raymond wrote:
> 
>>   I did a quick test, and using <li> in a <dl> produces a bullet on 
>>Firefox, IE and Opera, whereas <di> and the complete lack of a parent 
>>element did not. So, <li> didn't break anything, but it really didn't 
>>have the desired rendering on legacy browsers. This alone it a good 
>>argument for defeating <li> in this context. Plus, there's the 
>>additional fact that <di> is already in the XHTML 2.0 working draft, 
>>which means that it'll be easier to get <di> through W3C than <dl>/<li>.
> 
> That's a shame (about XHTML2). This seems a pretty unnecessary element.

    Depends on what you mean. I think some kind of grouping tag is 
necessary. You could argue that <li> can fulfill that role, but that's 
not the same as saying that a grouping tag isn't needed at all.

> A <dl> is a list and we want to describe items in this list. The fact 
> that those items are contained in a <dl> tells you what type of list 
> items they are. The argument regarding presentation on legacy UAs seems 
> pretty feeble. <li> elements can easily be restyled using CSS, leaving 
> only non-CSS browsers to worry about.

    That and situations where the stylesheet doesn't load. If the server 
is really busy, you may be able to load the HTML but not the CSS file.

    There's also the issue of the fact that all tag associated with 
definition lists start with the letter D (<dl>, <dt> and <dd>). The <li> 
element violates that nomenclature.

> Even then the web-developer has a 
> choice whether to use an <li>/<di> element or not. :-S

    True, but it's a matter of grouping complexity. You use <di> in 
situations where you have many terms and/or definitions that all relate 
to each other. There have been some suggestions that you can figure out 
what <dt> elements and <dd> elements relate to each other based on the 
order, but this seems problematic to me. I suspect some browsers would 
screw it up.

    Another issue is styling. How do you style a list item if you have 
no element for it?

Received on Saturday, 12 March 2005 09:20:23 UTC