Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it good semantic to give a dt more than one dd in the dl?

So I'm thinking something like:

<dl>
    <dt>job title</dt>
    <dd>job duration</dd>
    <dd>job description</dd>
    <dd>company link</dd>
</dl>

The example is purely make up, so it might not be the best example. but I've come across couple times when there is need for using 2 dd for 1 dt. so do you guys this is good semantic or bad semantic?

like image 968
fei Avatar asked Mar 01 '23 10:03

fei


1 Answers

The W3C document Lists in HTML Documents give an example with multiple terms and descriptions, so I guess it's fine. And it validates perfectly.

(Having said that, your example - which I appreciate is fictitious - is somewhat abusing <DL>, in that "job description" is not a definition of the term "job title".)

like image 173
RichieHindle Avatar answered Apr 02 '23 01:04

RichieHindle