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

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

From: Simon Pieters <zcorpan@gmail.com>
Date: Tue, 13 Feb 2007 16:17:57 +0100
Message-ID: <op.tno0r7d27a8kvn@hp-a0a83fcd39d2>
On Tue, 13 Feb 2007 15:52:23 +0100, Alexey Feldgendler  
<alexey at feldgendler.ru> wrote:

> On Tue, 13 Feb 2007 15:40:13 +0100, David Latapie <david at empyree.org>  
> wrote:
>
>> My humble point: <table> can do everything <dl> can, whilst the reverse
>> is not true. He who can do more can do less.
>
> <table> canot do this:
>
> <dl>
> <dt>computer</dt>
> <dd>An electronic device for information processing.</dd>
> <dt>driver</dt>
> <dd>A computer program taking care of direct communication with a  
> peripherial
> device.</dd>
> <dd>A person who drives a vehicle.</dd>
> </dl>

Note that as of HTML5 you want to use <dfn> in the <dt> when you're  
defining terms.

> How would you represent this in a <table> without abusing the very idea  
> of
> columns?

Don't know what you mean with "abusing columns", but:

    <table>
     <tr><th>computer<td>An electronic device for information processing.
     <tr><th rowspan=2>driver<td>A computer program taking care of direct  
communication with a peripherial
     <tr><td>A person who drives a vehicle.
    </table>

(Again use <dfn> if you're defining terms.)

I agree with David that <dl> is like a simple <table>. Sometimes <dl> is  
more convenient to use (both for the author and the reader).

-- 
Simon Pieters
Received on Tuesday, 13 February 2007 07:17:57 UTC

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