At 3/7/2007 11:13 PM, Thierry Koblentz wrote:
What's your definition of tabular data? Actually, what if there was only one
row for our example?
Would you consider marking up the following with a table?

President..................................John Smith

What for you makes a list of "name/value" pairs tabular data?


Pairs, triplets... the number of columns doesn't matter. For me a table is a dataset naturally structured in rows and columns -- in which everything in each column belongs to one class of data and everything in each row is one associated group. In your example, the two columns appear to be Position and Name. It's the fact that everything in the first column belongs to the class of Positions and everything in the second column belongs to the class of Names that's my clue that this is a regular dataset, and therefore a likely candidate for table markup in HTML.

The fact that it can also be marked up as a definition list is great -- that gives me two tools to choose from.


"what if there was only one row for our example?"

OK, I'll bite. Would I bother marking up a single row as a table? For that matter, would I bother marking up a single row as a definition list? Or any kind of list?

I guess it would depend on the circumstances. From where does the data originate? What's its purpose and function? Does this single row belong to a family of similar datasets elsewhere on the site that have more than one row? For easy, consistent styling I'd likely choose a single markup for all those datasets that have a similar look and feel and function.

One of the most important criteria for choosing table or list markup is going to be flexibility of styling. Tables can be restyled a bit but they have more restrictive limits than lists which are wonderfully malleable. I might choose DL simply to give myself and future designers more latitude in styling. Today's leader dots might yield to tomorrow's vertical stack of bold position over normal name.

To continue probing the edges of the problem, what if you strip the positions from your dataset and leave just the names? Is that single column tabular data? I say yes because everything in that one column belongs to a single data class. Would I mark up such a dataset as a table? Not usually, but I might if it belonged to a family of datasets that were marked up as tables. If it stood by itself I could choose among table, UL, and OL, and would likely choose list markup to provide the greatest freedom of styling.

Thierry, I understand that you're looking for simple criteria for deciding when to use table markup and when not to. Personally I don't think hingeing it on the number of columns is the way to go. I think the reality of HTML is that, when a dataset is sufficiently simple in structure and number of columns, there's more than one way to mark it up that can be equally effective structurally. A single-column table can be an unordered list. A two-column table in which the first column contains sequential numbers can be an ordered list. A multiple-column table in which the first column(s) contains row heads can be a definition list.

In the absence of any strong semantic cues, I'll choose a structure for its stylability. That might sound like semantic heresy, but I think it's inevitable when even so sparse a language as HTML gives us choices.

Regards,

Paul
__________________________

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to