Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > HTML/XHTML

  • Print
  • + Share This
  • 💬 Discuss
This chapter is from the book

Defining a Term

In the print world, it’s customary to differentiate a term visually when you define it. Typically, this is done with italics; subsequent uses of the term are not italicized.

In HTML, when you define a term, you differentiate it semantically with the dfn element. You wrap its tags only around the term you’re defining, not around the definition red-a.jpg. And just as in print convention, subsequent uses of the term are not marked with dfn, because you aren’t defining them again. (HTML refers to the point where you define a term as the “defining instance of a term.”)

red-a.jpg Note that although pleonasm appears twice in the example, dfn marks only the second one, because that’s when I defined the term. Similarly, if I were to use pleonasm subsequently in the document, I wouldn’t use dfn. Although browsers style dfn text differently than normal text red-b.jpg, what’s important is that the term is marked up differently. Also, you don’t have to use the cite element each time you use dfn, just when you reference a source.

103figb.jpg

Click to view larger image

red-b.jpg Typically, the dfn element renders in italics by default, as does cite.

To mark the defining instance of a term

  1. Type <dfn>.
  2. Type the term you wish to define.
  3. Type </dfn>.
  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus