HTML <dfn> tag
When writing in HTML (hypertext markup language), the <dfn> tag, also known as the HTML definition element, is an inline element used to represent the defining instance of a term. This tag has an order of operations of sorts; detailed below. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.
The <dfn> tag marks the term as being defined, but the actual definition should be given by the surrounding <p> element or definition list group.
This element is unique in that it is a phrase tag, which indicates that a section of text has structural meaning.
Example of <dfn> code
<p><dfn>Computer Hope</dfn> is a computer help website.</p>
Example result
Computer Hope is a computer help website.
Attributes
All HTML tags support standard attributes that define the settings of an HTML element. Unlike other HTML tags, the <dfn> tag has no unique attributes.
Additional notes on the usage of the <dfn> tag
The exact value of the term being defined changes based on the following situations:
- If the <dfn> tag has a title attribute, then that its definition is the value of that attribute.
- If <dfn> has an <abbr> tag with a title attribute, then that its definition is the value of that attribute.
- If <dfn> doesn't have either, the text inside its tags is the definition.
Compatibility
Edge | Internet Explorer | Firefox | Safari | Opera | Chrome |
---|---|---|---|---|---|
All versions | All versions | All versions | All version | All versions | All versions |