Peter Firminger wrote:
Definition lists are entirely appropriate for any name/value set and are quite different to other (ordered and unordered) lists. A div is far less semantically appropriate IMHO.I tend to agree, though sometimes it seems like lists are becoming the new tables.
Before a debate breaks out over that statement (though I suppose a discussion would be ok), I am well aware of the semantic value which lists add and that appearances can be deceiving.
<h2>News</h2> <dl id="news"><!-- id only needed if you need to style this differently to other DLs --> <dt>Article 1 name</dt> <dd><em>date</em></dd> <dd> <p>article 1 content</p> <p>article 1 content</p> </dd> </dl>
Then you will have granular control over the style of the decendants of the #news DL element so you could style (for example) the p element to have no top-margin and sit up under the date.
Which is why I think that <dd class="date">date</dd> would be better.
Now, for example, you can have the date before the name while keeping it following the name in the source.
****************************************************** The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
