Live Preview
A term marked with default italic styling:
HTML (HyperText Markup Language) is used to structure content on the web.

By the end of this tutorial, you’ll mark defining instances of terms semantically with <dfn> in real content.
Wrap the term being defined, not the full explanation.
Mark where a term is formally explained in your document.
Name the full term when visible text is abbreviated.
Let other links jump to glossary definitions.
Choose the right semantic tag for each use case.
Customize defined-term appearance beyond default italics.
<dfn> Tag?The dfn element (<dfn>) represents the defining instance of a term. Wrap the term itself in dfn; the explanation usually appears in the same sentence or parent element. Browsers often display dfn in italics by default.
<dfn> marks where a word is defined. The definition text lives in the surrounding sentence—not inside the tag itself.
Common uses include introducing technical vocabulary in tutorials, marking glossary entries, defining acronyms at first use, and clarifying domain-specific terms in articles or documentation.
Place the term inside dfn and write the definition nearby:
<p>
<dfn>HTML</dfn> (HyperText Markup Language) structures web page content.
</p><dfn> is an inline element—it nests inside paragraphs and headings.title when the visible text is an abbreviation of the full term.| Feature | Syntax / Rule | Notes |
|---|---|---|
| title | title="Full term" | When visible text differs |
| id | id="def-term" | Anchor for cross-links |
| Default style | Italic | font-style: italic |
| Wraps | The term | Not the definition text |
| vs abbr | Define vs abbreviate | dfn = defining instance |
| Use cases | Glossary, tutorials | Articles, specs, docs |
<dfn>, <abbr>, and <dt>These tags all relate to terminology but carry different meanings:
| Tag | Meaning | When to use |
|---|---|---|
<dfn> | Defining instance | Inline term definition in flowing text |
<abbr> | Abbreviation | Short form with optional title expansion |
<dt> | Description list term | Term label inside dl lists |
| Best fit | Inline vs list | dfn in paragraphs; dt in glossaries |
dfn has no required tag-specific attributes, but title and global attributes are useful:
title OptionalNames the full term when the visible text is abbreviated or shortened.
title="Cascading Style Sheets"id GlobalUnique anchor so other links can jump to this definition.
id="def-api"class GlobalCSS hook for custom defined-term styling.
class="term"lang GlobalLanguage of the defined term when it differs from the document.
lang="fr"title names the term when the visible text is abbreviated. id lets other links point to this defining instance.
Basic definitions, title for abbreviations, article concepts, and id cross-references with copy-ready code and live previews.
A term marked with default italic styling:
HTML (HyperText Markup Language) is used to structure content on the web.
Wrap the term and write the definition in the same sentence.
<p>
<dfn>HTML</dfn> (HyperText Markup Language) is the standard language for structuring web pages.
</p>Use <dfn> when introducing technical vocabulary in tutorials, marking glossary entries, defining acronyms at first use, and clarifying domain-specific terms in articles or documentation.
Use title when the visible text is a short form of the full term.
<p>
<dfn title="Cascading Style Sheets">CSS</dfn>
controls colors, layout, and typography on web pages.
</p>Mark a technical term at its first mention with a clear definition sentence.
<p>
<dfn>Responsive web design</dfn> is an approach where layouts adapt to different screen sizes using flexible grids, images, and media queries.
</p>Add an id so links can jump to the defining instance.
<p>See the <a href="#def-api">API</a> definition below.</p>
<p>
<dfn id="def-api">API</dfn>
(Application Programming Interface) lets software applications communicate.
</p>Browsers apply italic styling by default. Customize defined terms with color, weight, or background for clearer glossary markup:
font-style Default italiccolor Highlight defined termsfont-weight Emphasize glossary entriesbackground Subtle term highlight/* Defined term styling */
dfn {
font-style: italic;
color: #1e40af;
}
dfn.term-highlight {
font-weight: 600;
background: #eff6ff;
padding: 0.1rem 0.25rem;
border-radius: 4px;
}Live styled defined term
Semantic HTML uses elements that convey meaning, not just appearance.
Semantic definitions help readers understand specialized vocabulary:
Wrap the word or phrase in dfn at its defining instance.
The explanation lives in the same paragraph or parent element.
Default italics signal a defined term; CSS can customize further.
Readers and machines can identify where terms are formally defined.
The <dfn> element is fully supported in all browsers, including legacy Internet Explorer.
From legacy Internet Explorer to the latest mobile browsers — the dfn element is fully supported for semantic term definitions.
Bottom line: Ship semantic term definitions with confidence. The <dfn> element is safe to use in every production environment today.
The <dfn> tag marks where a term is defined in your content. Use it with clear surrounding definitions, add title for abbreviations, and use id for glossary cross-links—not just for visual highlighting.
id for glossary linksdfn only for bold or italic styledfn with abbr or dt<dfn>Bookmark these before you ship — they’ll keep your definition markup semantic and accessible.
<dfn> marks where a term is formally defined.
Not the full definition sentence.
SyntaxBrowsers apply font-style: italic by default.
RenderNames the full term for abbreviated text.
MetadataEnable glossary anchors and jump links.
PatternDifferent tags for abbreviations and list terms.
Semanticsdfn marks where a term is formally defined. abbr marks an abbreviation and often uses title for the expansion.dt labels terms in a dl list structure. dfn defines terms inline within flowing text like paragraphs.Practice dfn, title, and glossary cross-links in the interactive HTML editor.
6 people found this page helpful