Web Semantics Fun – A Valid Use of the Table Tag?
by Matt on , under Web Development
If you’ve been keeping up to date with the latest in Web Development you’ll know that tables are bad. The very mention of this tag is enough to make veteran CSS stylists launch into a manic episode resulting in you losing your front teeth. Or at the very least your dignity!
I’ve been wondering lately though – are there more uses for table than simply for scientific or mathematical tabular data? Take the example of a product grid on a site like Amazon. 15 products are displayed on each page, 3 columns by 5 rows. Would it be appropriate to use DIV’s over tables in this instance? If you implemented the solution with DIV’s you’d have to use three seperate tags – one corresponding to each column. Now let’s assume that you are using a screenreader. You are likely to interpret that the products grid consists of three independent divisions or parts. Is this correct semantically? I don’t think so. After all we’re displayed objects from the same entity – Products.
I’d be more inclined to use a table here, as at least it unifies all of the objects under one tag.
It’s all too easy to assume that DIV’s are the solution to every XHTML problem these days. I guess it takes you to stand back a bit and assess the situation properly from the perspective of the user.