Click here to get back home

Definition lists

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Definition lists D.M. Procida 03-03-2008
  `--> Re: Definition lists Jukka K. Korpel...03-03-2008
Get Chitika Premium
Posted by D.M. Procida on March 3, 2008, 9:01 am
Please log in for more thread options
Suppose you had a single key-value pair - would you use a definition
list to mark that up? For example:

<dl>
<dt>Director</dt>
<dd>Jane Smith</dd>
</dl>

Of course a list can have just one item in it, but is something that can
only ever have one item in it still a list?

Daniele

Posted by Stefan Ram on March 3, 2008, 9:48 am
Please log in for more thread options
real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) writes:
><dl>
> <dt>Director</dt>
> <dd>Jane Smith</dd>
></dl>
>Of course a list can have just one item in it, but is something that can
>only ever have one item in it still a list?

Actually, this is the only way to write a relation between a
definition term and a definition datum in a non-ambiguous way
using HTML 4.01, because for more elements, such as in

<dl><dt>a</dt><dd>b</dd><dt>c</dt><dd>d</dd></dl>

, the HTML 4.01 specification does not say whether "<dt>a</dt>"
is the definition term for "<dd>b</dd>" or "<dd>d</dd>", see:

http://www.w3.org/TR/html401/struct/lists.html#h-10.3


Posted by Jukka K. Korpela on March 3, 2008, 5:18 pm
Please log in for more thread options
Scripsit Stefan Ram:

> real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) writes:
>> <dl>
>> <dt>Director</dt>
>> <dd>Jane Smith</dd>
>> </dl>
>> Of course a list can have just one item in it, but is something that
>> can only ever have one item in it still a list?
>
> Actually, this is the only way to write a relation between a
> definition term and a definition datum in a non-ambiguous way
> using HTML 4.01,

That might be true in a relatively irrelevant sense.

To the extent that it is true, it proves that the markup is semantically
completely wrong, since this is not about defining the term "director".

As explained in detail at http://www.cs.tut.fi/~jkorpela/def.html ,
there is no adequate markup for definitions in HTML. Just don't try too
hard, and try to write markup that _otherwise_ makes sense.

If you wish to present filmographic information, for example, using a
table is quite adequate, both logically and for rendering purposes. You
can use <th> markup for header-like things like "Director" and <td> for
data cells. Just use CSS to make <th> element content left-aligned.

(IMDb uses more contrived and less logical markup, so they have to take
extra trouble to make the stuff _look_ like a table. "Tableless design"
is absurd when your data contains tabular data!)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Similar ThreadsPosted
What is the difference between a "A" and "TD A" definition ? May 9, 2007, 4:52 am
change CSS definition by javascrip May 13, 2005, 2:07 pm
Status Code Definition of "-1" December 11, 2006, 11:45 am
numbered definition list July 23, 2007, 8:11 pm
lists in tables October 9, 2004, 5:43 am
Definition List format adjustments August 8, 2007, 3:44 am
Blank line after a definition list (DL)? March 2, 2008, 3:44 pm
Problem with descriptive lists in CSS July 6, 2004, 2:54 am
Markup problem: P and lists September 13, 2007, 1:17 pm
CSS display blocks and select lists in IE July 16, 2004, 9:59 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap