Alex Rivera | Logout

Table or list: what should I use here?

Asked 2012-05-16T14:46:27.447
12

I would like to know which tags I should use for layout like this. Semantically is both a table and a list to me. How I can achieve those underlines and keep the markup right?

enter image description here

Edit
Report

1 Answer

1
  • Just because you have sub-data, does not mean it's a list; there are plenty of tables that have subcategories (just look at a general ledger)
  • You have multiple pieces of structured information, arranged in a consistent way, which constitutes a table, or tabular data
  • What you're showing above is the equivalent of a TOC (Table of Contents) and it's a table for a reason (you have a label and a value)

That being said, this day in age it doesn't really matter what you use as long as you can defend it, especially since lists/divs can take on the shape of a table.

It's more improper to use a table for something that is not a table, than to use a list for something that could use a table.

answered 2012-05-16T15:12:52.837

Your Answer