Definition (<dfn>)
When To Use
- Used to identify a word or phrase as a term, that has a corresponding definition when its first used. 1
Rules
- The ancestor <p> element or the closest <section> ancestor of the <dfn> element is regarded as the definition of the term. 1 Except when:
- you include a title attribute that contains the non-abbreviated term that is being defined (and nothing else). This attribute is then considered as the primary term being defined, rather than the text within the <dfn> element. However, the <dfn> element still requires text inside, which may be another variation of the term or an abbreviation. 1
- the <dfn> element contains only an <abbr> element with a defined title attribute, then that title is regarded as the term being defined. 1
- By incorporating an id attribute on the <dfn> element, you can establish a link to it using <a> elements. This should be done when the defined term reappears in the document. If the term appears frequently, link to its definition relatively infrequently. 1 4
- It is possible to combine <dfn> elements and <abbr> elements. For examples of this, please refer to the HTML Element Abbreviation article. 1
- In a <dl> list, the <dt> element does not solely represent something that is being defined. Rather, it signifies an association list with name-value pairs, such as questions and answers. Therefore, if you intend to define something within a <dl> list, you can include the <dfn> element within the <dt> element. 3 2
Examples
<p><dfn>ARIA</dfn> defines semantics that can be added elements.</p>
Sources
- MDN: <dfn>: The Definition element by Mozilla contributors is licensed under CC-BY-SA 2.5
- HTML Spec: Living Standard, 4.5 Text-level semantics, dfn is licensed under Creative Commons Attribution 4.0 International License
- HTML Spec: Living Standard, 4.5 Text-level semantics, dt is licensed under Creative Commons Attribution 4.0 International License
- A List Apart: The Accessibility Hat Trick: Getting Abbreviations Right by Colin Lieberman