Is there any logical reason for using the
From the W3C documentation:
Definition lists vary only slightly from other types of lists in that list items consist of two parts: a term and a description. The term is given by the DT element and is restricted to inline content. The description is given with a DD element that contains block-level content.
There are a couple of markup examples on the W3C page.
Citing the W3C spec:
The dl element represents an association list consisting of zero or more name-value groups (a description list). Each group must consist of one or more names (dt elements) followed by one or more values (dd elements). Within a single dl element, there should not be more than one dt element for each name.
So the main reason for the <dl>
, <dt>
and <dd>
tags are to preserve the semantic connection for those name-value pairs, which would get lost, if you just used nested lists.
If you use nested lists, this could be done for various reasons (currently, e.g., many menus are structured into nested lists) and crawlers or any other system, that respects semantic annotations, would not be able to tell the difference.
If you use the above tags, however, a system can see the connection and act accordingly. So a future use maybe to extract all definitions of terms inside a larger document to create some kind of glossary.