Semantic Implications of Multiple <dd> Tags
When using <dl> lists to bind keys to values, is there a semantic difference between the two patterns? Which one provides the best semantics? What do several <dd> tags mean in this context?
Example 1 : multiple <dd> elements.
<dl> <dt>Authors</dt> <dd>John Lennon</dd> <dd>Paul McCartney</dd> <dt>Genres</dt> <dd>Pop</dd> <dd>Rock</dd> </dl> Fangs output:
Two-List Definition Authors Are Equal John Lennon Equal Paul McCartney Genres Equal Pop Equals End Of Rock List
Example 2 : a single <dd> contains <ul>
<dl> <dt>Authors</dt> <dd> <ul> <li>John Lennon</li> <li>Paul McCartney</li> </ul> </dd> <dt>Genres</dt> <dd> <ul> <li>Pop</li> <li>Rock</li> </ul> </dd> </dl> Fangs output:
A list of definitions from two points. Authors are equal. List of two items. bullet. John Lennon bullet. Paul McCartney. The end of the list. Genres are equal. List of two items. bullet. Pop bullet. "Rock List end End end".
The document you are referencing contains the following example:
In the following example, one entry (“Authors”) is associated with two values (“John” and “Luke”).
<dl> <dt> Authors <dd> John <dd> Luke <dt> Editor <dd> Frank </dl>
In other words, the two <dd> elements following the same <dt> element are associated with the same <dt> element.
In terms of semantics there are not so many differences, then between several consecutive <dd> elements and the presence of a single <dd> , which, in turn, contains <ul> . If it is important to separate the “list” (a <ul> in one <dd> ) from the “group of values" (several <dd> in the sequence), then I would make a decision based on this. If this is not important, then after selecting I would select a few <dd> in the sequence, because it is easier.
The corresponding part of the definition of dl :
Values within the group are alternatives; several paragraphs that are part of the same value should be indicated in the same dd element.
I think a clear example would be dl describing homonyms, for example. " bank ":
<dl> <dt><dfn>bank</dfn></dt> <dd>An institution where one can place and borrow money and take care of financial affairs.</dd> <dd>An edge of river, lake, or other watercourse.</dd> <dd>A row or panel of items stored or grouped together.</dd> </dl> ↑ Here the term “bank” ( dt ) has three meanings ( dd ). Using the same dd with ul will not contain the same semantics:
<dl> <dt><dfn>bank</dfn></dt> <dd> <ul> <li>An institution where one can place and borrow money and take care of financial affairs.</li> <li>An edge of river, lake, or other watercourse.</li> <li>A row or panel of items stored or grouped together.</li> </ul> </dd> </dl> ↑ Here the term “bank” would have only one meaning (and this meaning consists or is described by ul ).
Returning to your example, you usually want to use the first option (as described by BoltClock ), because each author is really a “value” ( dd ) in the group of authors.
However, ultimately it depends on your content and, more importantly, on your understanding of that content.