Definition List or Table?

A recent article on And all that Marlarkey talks of using a definition list to add more semantics to an e-commerce site. But does it? After reading and re-reading the specs on using a definition list at the W3C, I'll admit that it could be a valid implementation. However, could using a table bring more relevance to the data and still be styled to its fullest?

Yes and no. While a table certainly allows for a greater degree of association between elements, it's not possible have them styled to the same degree in all browsers — in this case, I'm talking about IE.

Using this simple definition list example over at Maxdesign, I moved the data into a table and styled it.

In Firefox and Opera 7.5, I'm able to pull off the same look and feel as the definition list. Internet Explorer, on the other hand, still keeps the table structure and we are left with a rather basic table. At least it fails gracefully!

Example: Definition List versus the Table

Published June 10, 2004 · Updated September 17, 2005
Categorized as HTML and CSS
Short URL: https://snook.ca/s/166

Conversation

1 Comment · RSS feed
Sales Recruitment said on October 02, 2008

LOL, at lest it fails gracefully - well said!

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.

Want to learn about scaling CSS for large projects?

I'm available for full and half-day workshops on scalable CSS architecture. I can provide on-site training for your team. Interested?
Get in touch.