The HTML <dfn>
element defines a term within a document, helping to provide clarity and context. It is often paired with the <abbr>
element to describe or explain an abbreviation or acronym.
Syntax
The syntax for the <dfn>
element is as follows:
1 | <dfn>Definition goes here</dfn> |
Example
1 | <p>The acronym <dfn>HTML</dfn> stands for HyperText Markup Language.</p> |
This example demonstrates the usage of the <dfn>
element to define the acronym “HTML” and provide its meaning.
Result
Most browsers display <dfn>
content with italicized styling.
Attributes
The <dfn>
element has no specific attributes, however, it inherits common global attributes that apply to most HTML elements, such as class
, id
, style
, and title
.
Content
The <dfn>
element accepts inline elements, text, or other HTML elements as its content and typically wraps around the term or phrase that requires a definition.
Did You Know?
- The
<dfn>
element can help create glossaries or explain technical terms in educational or technical documentation.