Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use dfn and dt together?

Tags:

html

According to HTML5Doctor's article on the dl element: "<dl> can be used to mark-up a glossary of terms, although you must remember to use <dfn> to indicate that the word is defined [in the same document]." Note: the bracketed language is my own. The article gives this markup to explain:

<dl>
  <dt><dfn>RSS</dfn></dt>
  <dd>An XML format for aggregating information from websites whose
    content is frequently updated.</dd>
</dl>

Note that the term "RSS" is enclosed in both dt and dfn tags.

My question is this: why must we remember to use dfn? That isn't explained convincingly. I'm looking for definitive explanation of dfn usage as well as some concrete examples.

Note: I looked at The dfn tag documentation by the W3C but that didn't answer my question.

Additional Background and References

Interestingly (or not), according to the HTML5Doctor article the dl element was renamed to 'description list' in HTML5. Formerly it the 'definition list'. From the W3C Working Draft on the Description List:

The dl element represents a description list, which consists of zero or more term-description (name-value) groupings; each grouping associates one or more terms/names (the contents of dt elements) with one or more descriptions/values (the contents of dd elements).

like image 528
David J. Avatar asked Jun 16 '12 19:06

David J.


1 Answers

Interestingly (or not), according to the HTML5Doctor article the dl element was renamed to 'description list' in HTML5.

That sums it up; now that dl is no longer exclusively applicable to definition lists, but to any kind of lists which contain terms and their corresponding descriptions, the dfn tag is recommended use to indicate that the content of the dt is in fact a definition term; that is, a term whose description is in fact its definition (something once necessarily true in previous specifications but no longer in HTML5).

Confusing, I know, but that's the basic idea: use dfn in a dt if the content of the dt is something that's being defined by its dd.

like image 132
BoltClock Avatar answered Oct 13 '22 21:10

BoltClock