HTML <dfn> Element

The <dfn> element identifies a term that is being defined within the surrounding sentence, paragraph, or other content. It gives the term semantic meaning while the nearby text provides its definition or explanation.

Syntax

<p><dfn>HTML</dfn> is a markup language used to structure content on web pages.</p>

The <dfn> element surrounds the term being defined, while the surrounding content provides the definition.

Attributes

The <dfn> element supports the global HTML attributes. It does not have any element-specific attributes.

Example

The following example identifies HTML as the term being defined and provides its definition in the same paragraph:

Play in Editor

Usage Notes

Use the <dfn> element for the term being defined, not for the definition itself. The definition should be provided by the surrounding paragraph, sentence, description list, or other nearby content.

If the <dfn> element has a title attribute, the value of that attribute represents the term being defined. Otherwise, the term is determined from the element's text content, with special rules when an <abbr> element is used inside it.

An id can be assigned to the <dfn> element so links elsewhere on the page or website can point directly to the term's definition.

Browsers commonly display <dfn> text in italics by default, but its semantic purpose is to identify a defining instance of a term rather than simply to create italic text.

Accessibility

Place the definition close enough to the <dfn> element that the relationship between the term and its explanation is clear when the content is read in sequence.

Do not rely on the default italic styling alone to indicate that a term is being defined. The surrounding wording should make the definition understandable regardless of visual presentation.

Browser Support

Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.

For detailed browser compatibility information, see Can I Use: HTML <dfn> Element .

<abbr> - Represents an abbreviation or acronym and can be used within a defining term.

<dl> - Represents a description list containing groups of terms and descriptions.

<dt> - Represents a term or name within a description list.

<dd> - Provides a description, definition, or value for a term in a description list.

Specifications

HTML Living Standard: The <dfn> Element