<dfn>

Term side of the Card.
Topic: Semantics
Unit title: <dfn>
Categories: Tag
Explanation side of the Card

Explanation: The element that is used to indicate a term that is being defined within the content. It's often displayed in italics or bold and provides a clear marker for the first use or definition of a term in a document.

Browser compatibility:
  • The chrome browser supports this feature starting from version 15.
  • The edge browser supports this feature starting from version 12.
  • The firefox browser supports this feature starting from version 1.
  • The safari browser supports this feature starting from version 6.
Availability: 

Example

Wronghtml
<p>
  <i>Latency</i> is the delay before data arrives.
</p>
Righthtml
<p>
  <dfn id="latency">Latency</dfn> is the delay before data arrives.
</p>

<dfn> marks where the term is defined, and the id lets later mentions link back to it.

Common mistakes

  • Wrapping every mention of the term in <dfn> instead of only the defining one.
  • Using <dfn> without the definition being in the same paragraph or section.

Interview questions

What is the difference between <dfn> and <dl>?

<dfn> marks a term defined inline in prose, while <dl> with <dt> and <dd> builds a list of terms and descriptions.

Can I use <abbr> inside <dfn>?

Yes. Nest <abbr title="..."> inside <dfn> when the defined term is an abbreviation.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy