HTML <dfn> tag

Updated: 10/11/2017 by Computer Hope

HTML dfn tagWhen writing in HTML, 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 when it comes to usage; detailed below. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Note: 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.

Note: This element is unique in that it is a phrase tag, which indicates that a section of text has structural meaning.

Example code

<p><dfn>Computer Hope</dfn> is a computer help website.</p>

Example result

Computer Hope is a computer help website.

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the <dfn> tag does not have any unique attributes, it does utilize all of the standard attributes.

Addition notes on the usage of <dfn>

The exact value of the term being defined changes based on the following situations:

  1. If the <dfn> tag has a title attribute, then that its definition is the value of that attribute.
  2. If <dfn> has an <abbr> tag with a title attribute, then that its definition is the value of that attribute.
  3. If <dfn> doesn't have either, the text inside its tags is the definition.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
All versions All versions All version All versions All versions

Additional phrase tags

Browser, Compatibility, Web design terms