HTML - <dfn> Tag
The HTML <dfn> tag stands for "definition". When we are defining a term we use this tag to highlight the term (that is being defined).
When a term is within the <dfn> element, the browser recognizes it as definition of the term. The <dfn> tag can include the title attribute, which specifies the term's definition and displays it when the mouse hovers over it.
The term being defined is identified following these rules
- If the <dfn> element contains a single child element and has no text content of its own, add an <abbr> tag inside the <dfn> tag.
- Alternatively, with the id attribute added, an <a> tag can be used to refer back to the definition whenever the term is used.
Syntax
Following is the syntax of the HTML <dfn> tag −
<dfn title=".."> .... </dfn>
Example: Creating Definition Element
The following examples demonstrates various uses of the <dfn< element. Illustrating its use cases. In the example below, we run the code, it generates an output displaying the text on the webpage.
<!DOCTYPE html>
<html>
<body>
<p>
<dfn>tutorialspoint</dfn> is the EdTech company
that provides good courses and technical tutorials for every bf
technologies.
</p>
</body>
</html>
Example: The title Attribute with dfn Element
In the following example, we create an HTML document and use the <dfn< tag with the title attribute. When we run the code, the output window will display the <dfn> tag text on the webpage. When the user hovers over the text, the title will be shown.
<!DOCTYPE html>
<html>
<body>
<p>
<dfn title="ReactJS">ReactJS</dfn> is the
library of the JavaScript language!.
</p>
</body>
</html>
Example: The <abbr> Tag with dfn Element
Let's examine the following example where we create an HTML document and use the <abbr> tag inside the <dfn< tag. When we run the code, it will generate an output displaying the text on the webpage.
<!DOCTYPE html>
<html>
<body>
<p>
<dfn>
<abbr title="Hypertext Markup Language">HTML</abbr>
</dfn> is the standard markup language for creating web pages.
</p>
</body>
</html>
Example: The id Attribute with <dfn> Element
In the following example, we add the id attribute, it can be linked to the definition using an <a> tag. When we run the code, the output window will display the text on the webpage.
<!DOCTYPE html>
<html>
<body>
<p>
<dfn id="definition-dfn">HTML Definition element</dfn>
is used to indicate the term being defined within the
context of a definition phrase or sentence.
</p>
<p>
Because of all of that, we decided to use the
<a href="#definition-dfn">HTML dfn tag</a>
</p>
</body>
</html>
Supported Browsers
| Tag | ![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|
| dfn | Yes | Yes | Yes | Yes | Yes |




