HighDots Forums  

Definition lists

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Definition lists in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
D.M. Procida
 
Posts: n/a

Default Definition lists - 03-03-2008 , 08:01 AM






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

Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Definition lists - 03-03-2008 , 04:18 PM






Scripsit Stefan Ram:

Quote:
real-not-anti-spam-address (AT) apple-juice (DOT) 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/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.