Description
The HTML element <dfn> (short form of definition) is used to represent a term that is going to be defined by its parent element.
The parent element must also include the definition or explanation of the term specified within the <dfn> element.
The below table summarizes its usage.
| Usage Details | |
| Placement | It is displayed as an Inline element. |
| Contents | It can contain Inline elements and text. |
| Tags | Both opening and closing tags are required. |
| Versions | HTML 2, 3.2, 4, 4.01, 5 |
Syntax
Here is the basic syntax of the <dfn> element.
<dfn>...</dfn>
Examples
Basic use with just a simple text within the <dfn> element.
<p><dfn>HTML</dfn> stands for HyperText Markup Language, which is a standard markup for creating web pages.</p>
Using title attribute on the <dfn> element.
<p><dfn title="HyperText Markup Language">HTML</dfn> stands for HyperText Markup Language, which is a standard markup for creating web pages.</p>
Using <abbr> within the <dfn> element.
<p><dfn><abbr title="HyperText Markup Language">HTML</abbr></dfn> stands for HyperText Markup Language, which is a standard markup for creating web pages.</p>
In the below example, the <dfn> element is used while defining a term.
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h1>HTML Element - dfn</h1>
<p><dfn>HTML</dfn> stands for HyperText Markup Language, which is a standard markup for creating web pages.</p>
</body>
</html>
Attributes
The following table shows the list of supported and unsupported attributes for the <dfn> tag.
| Attribute Type | Details |
| Element-Specific Attributes | The tag <dfn> doesn't have any element-specific attributes. |
| Global Attributes | Like all other HTML tags, the tag <dfn> supports the HTML Global Attributes. |
| Event Attributes | The tag <dfn> also supports the HTML Event Attributes. |
Browser Compatibility
The tag <dfn> is supported in all modern browsers.
- Google Chrome 1+
- Internet Explorer or Edge 2+
- Firefox 1+
- Apple Safari 1+
- Opera 4+