HTML <dfn> Tag

Beginner
5 min read
Updated: Oct 2026
4 examples
Live preview

Definition and Usage

The <dfn> element marks the term being defined. Put it inside a complete definition statement — usually a paragraph, a <dt> / <dd> pair, or a nearby section that explains the term.

Give it an id so later mentions can link back with <a href="#…">. Pair with <abbr> when the defined term is shown as an abbreviation.

Baseline · Widely available.

Not deprecated. Stable across browsers since about July 2015 (and much earlier in practice).

Special title.

If <dfn> has a title, that value is the term being defined and must contain only that term (MDN / HTML).

HTML Syntax

syntax.html
<dfn> term</dfn>

Both start and end tags are required. Content is phrasing content; do not nest another <dfn> inside. The implicit ARIA role is term.

Attributes

<dfn> has no tag-specific attributes beyond globals. These globals matter most in practice:

AttributeDescriptionTry it
titleIf present, its value is the term being defined (must be that term only)Try it
idTarget for links that jump back to this definitionTry it

Global Attributes

The <dfn> tag also supports the Global Attributes in HTML.

Live Preview

Pick a term. The sentence defines it; <dfn> marks the defining occurrence.

A real <dfn> inside a definition sentence.

Definition

A validator is a program that checks for syntax errors in code or documents.

Term marked by dfn: "validator"

HTML Examples

Short, copy-ready snippets. Use Try It Yourself for a live editor.

Example 1 — Mark the Defined Term

Wrap the term inside the sentence that defines it.

HTML
<p>
  A <dfn>validator</dfn> is a program that checks
  for syntax errors in code or documents.
</p>
Try It Yourself

How It Works

  1. Write a full definition sentence (not just the word alone).
  2. Wrap the term in <dfn>…</dfn>.
  3. Leave the explanation as normal text around it.
  4. Without title, the text inside <dfn> is the term being defined.

Example 3 — Definition with <abbr>

Nest <abbr> when the defined term is shown as an abbreviation.

HTML
<p>
  The
  <dfn><abbr title="Hubble Space Telescope">HST</abbr></dfn>
  is among the most productive scientific instruments ever built.
</p>
Try It Yourself

How It Works

  1. Wrap the short form in <abbr title="Full Name">.
  2. Wrap that abbr in <dfn> to mark the defining occurrence.
  3. Explain the term in the surrounding sentence.
  4. Later mentions can reuse <abbr> without another <dfn>.

Example 4 — Term in a Description List

Use <dfn> inside <dt> when the list entry defines the term.

HTML
<dl>
  <dt><dfn>HTML</dfn></dt>
  <dd>HyperText Markup Language — structures web pages.</dd>
</dl>
Try It Yourself

How It Works

  1. Open a <dl> for term/detail pairs.
  2. Put the term in <dt> and wrap it with <dfn> if this is the defining instance.
  3. Explain it in <dd>.
  4. Use this for glossaries; use a paragraph <dfn> for inline definitions in prose.

Edge Cases & Pitfalls

Most mistakes wrap every mention in <dfn> or confuse it with <abbr>.

semantics

One defining instance

Mark the place where the term is defined. Later uses are normal text (or links), not more <dfn> tags.

context

Needs a real definition nearby

The definition lives in the surrounding paragraph, dt/dd, or section — not in the empty tag alone.

title

title must be the term only

If you set title on <dfn>, put the term there and nothing else.

nesting

No nested dfn

A <dfn> must not contain another <dfn>.

vs abbr

dfn ≠ abbr

<abbr> is for short forms; <dfn> is for the defining occurrence of a term. Combine them when both apply.

Browser Support

The <dfn> element is core HTML in every browser. It is not a Node.js, Deno, or Bun API.

✓ Baseline · Widely available

<dfn>

Widely available since about July 2015 (and long before). Chrome, Firefox, Safari, Edge, and Opera all support dfn. Default italic styling is common but not required by authors.

98% Global support (approx.)
Google Chrome All
Full support
Mozilla Firefox All
Full support
Apple Safari All
Full support
Microsoft Edge All
Full support
Opera All
Full support
Samsung Internet All
Full support
Internet Explorer All
Supported
<dfn> Widely supported

Bottom line: Safe everywhere for semantic term definitions. Focus on correct placement in a definition sentence, not on browser quirks.

Key Takeaways

  • Role: marks the term being defined in a full definition statement.
  • Links: add id and point later uses with <a href="#…">.
  • Combo: nest <abbr> when the defined term is an abbreviation.
  • Restraint: one defining <dfn> per term in that context — not every mention.

One line: <dfn> highlights where a term is defined — keep the full explanation in the surrounding text.

Default CSS Settings

Many browsers italicize defined terms by default:

default.css
dfn {
  font-style: italic;
}

Override with your own CSS if italics clash with design. Keep a visible cue if readers benefit from spotting definitions.

Frequently Asked Questions

The dfn element marks the term being defined. Place it inside a full definition sentence or phrase — often a paragraph, a dt/dd pair, or a section that explains the term.
No. Without title, the text inside dfn is the term. If you set title, that value is the term being defined and must contain only that term (useful when the visible text is an abbreviation).
abbr marks an abbreviation or acronym. dfn marks the defining occurrence of a term. You can nest abbr inside dfn when the defined term is shown as an abbreviation.
Give the dfn an id, then link with <a href="#that-id">. Use that for later mentions of the term so readers can jump to the definition.
No. A dfn must not contain another dfn. Keep one defining instance per term in that context.
Related idea, different tools. dt is a term in a dl list; dfn marks a term inside a definition sentence. You can use dfn inside dt when helpful.

Next: dialog

Build modal and non-modal dialogs with the dialog element.

dialog tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

7 people found this page helpful