- Home
- /
- Tutorials
- /
- HTML Tutorial
- /
- HTML <dfn> Tag
HTML Tags
HTML <dfn> Tag
The dfn tag marks the place where a term is defined: the one spot in your text where you explain what a word means. Later mentions of the same word are normal text.
That is all it does. Browsers show it in italics by default. Its value is in the meaning: it tells search engines and assistive tools "this sentence defines this term", which suits glossaries, documentation and tutorials.
Syntax
html
<dfn>term being defined</dfn>There are no attributes of its own. If the term written inside is not the exact term being defined, put the term in title: <dfn title="HyperText Markup Language">HTML</dfn>.
Example
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DFN Tag Example</title>
</head>
<body>
<p>
<dfn>HTML</dfn> is a markup language used to structure content on the web.
</p>
</body>
</html>"HTML" appears in italics, and the sentence around it is its definition.
The rules
- The
<dfn>goes around the term, and the definition must be in the same paragraph, list item or description list entry. - Use it once per term, at the place where you define it.
- Give it an
id, and you can link back to the definition from anywhere:<a href="#def-html">HTML</a>.
An abbreviation being defined
html
<p>
<dfn id="def-css"><abbr title="Cascading Style Sheets">CSS</abbr></dfn>
is the language used to style web pages.
</p>For abbreviations on their own, see the abbr tag.
Browser Support
Chrome | Edge | Firefox | Safari | Opera | IE9+ |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
HTML <dfn> Tag exercises
Define a term
Write this paragraph and mark the word it defines: A viewport is the visible area of a page.
Result
