- Starting a New Paragraph
- Adding Author Contact Information
- Creating a Figure
- Specifying Time
- Marking Important and Emphasized Text
- Indicating a Citation or Reference
- Quoting Text
- Highlighting Text
- Explaining Abbreviations
- Defining a Term
- Creating Superscripts and Subscripts
- Noting Edits and Inaccurate Text
- Marking Up Code
- Using Preformatted Text
- Specifying Fine Print
- Creating a Line Break
- Creating Spans
- Other Elements
Defining a Term
The dfn element marks the one place in your document that you define a term. Subsequent uses of the term are not marked. You wrap dfn only around the term you’re defining, not around the definition .
Note that although pleonasm appears twice in the example, dfn marks the second one only, because that’s when I defined the term (that is, it’s the defining instance). Similarly, if I were to use pleonasm subsequently in the document, I wouldn’t wrap it in dfn because I’ve already defined it. By default, browsers style dfn text differently than normal text . Also, you don’t have to use the cite element each time you use dfn, just when you reference a source.
...
<body>
<p>The contestant was asked to spell "pleonasm."
She requested the definition and was told that
<dfn>pleonasm</dfn>
means "a redundant word or expression"
(Ref: <cite><a href=" http://dictionary.reference.com/browse/pleonasm" rel="external">dictionary.com</a></cite>).</p>
</body>
</html>
The dfn element renders in italics by default in some browsers (Firefox, in this case), just like cite, but not in Webkit-based browsers such as Safari and Chrome. You can make them consistent by adding dfn { font-style: italic; } to your style sheet (see Chapters 8 and 10).
It’s important where you place the dfn in relation to its definition. HTML5 states, “The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element.” This means that the dfn and its definition should be in proximity to each other. This is the case in both and the example given in the third tip; the dfn and its definition are in the same paragraph.
To mark the defining instance of a term
- Type <dfn>.
- Type the term you wish to define.
- Type </dfn>.