W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2007

[whatwg] Definition list and tables: what's the difference ?

From: David Latapie <david@empyree.org>
Date: Tue, 13 Feb 2007 15:40:13 +0100
Message-ID: <20070213154013845618.b7cdeb32@empyree.org>
Hello and thank you for your reply,

On Tue, 13 Feb 2007 14:35:15 +0100, Alexey Feldgendler wrote:
> The fundamental difference between tables and definition lists is 
> that a table 
> is a two-dimensional mapping of a pair of axes to one value, and a 
> definition 
> list is a uni-dimensional mapping of a term to one or more 
> definitions. While 
> there are some cases when either a table or a definition list can be 
> used at 
> author's choice, generally their use cases are different.
> 
> The most notable case when a table is inappropriate to replace a 
> definition list 
> is when a definition list contains multiple definitions for each term 
> or group 
> of terms. While multiple definitions can be either stuffed into one 
> table cell 
> or laid out in a row, both solutions seem like a workaround. 

IMHO, most tables (particularly on the Web and of course discarding 
layout tables) really are one-dimensional (cross-tabs are the 
two-dimensional ones).

See below:

Simple (one key, one value)
? TH   TD

? DT
    DD

More common (one key, several values)
? TH   TD   TD

? DT
    DD
    DD

(Pure) Synonyms (several keys, one value)
?  TH   
        TD
   TH   

? DT
  DT
    DD
(semantically broken, do-not-use)

Cross-tab
?       TH
   TH   TD

?  <impossible>

Complex cross-tab
?       TH   TH   (colspan or rowspan)
-----+-----+-----
  TH |     |
-----+     +------
  TH |     |
-----+-----+-----
  TH |     |
-----+-----+-----

? <impossible>

My humble point: <table> can do everything <dl> can, whilst the reverse 
is not true. He who can do more can do less.

Any thought on this?
-- 
</david_latapie>             U+0F00
http://blog.empyree.org/en (English)
http://blog.empyree.org/fr (Fran?ais)
http://blog.empyree.org/sl (Slovensko)
Received on Tuesday, 13 February 2007 06:40:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:32 UTC