dfn

< html‎ | elements
Jump to: navigation, search

dfn

This article is In Progress.



Summary

The dfn element indicates the defining instance of a term.


Overview Table

DOM Interface HTMLElement
  • If the dfn element is specified, nearest parent of the dfn element(paragraph, description list group, or section) must also contain the definitions for the defining term.
  • The priority level of defining term is as follow:
    1. Value of the title attribute in the dfn element.
    2. Value of the title attribute in the abbr element. (if the dfn element contains exactly one element child node and no child text nodes, and that child element is the abbr element
    3. TextContent of the dfn element
  • If the title attribute of the dfn element is present, then it must contain only the term being defined.


Compatibility

Do you think this data can be improved? You can ask to add by opening an issue or make a pull request.

Desktop

FeaturesChromeFirefoxInternet ExplorerOperaSafari
Basic support
?
Yes
1.0
Yes
?
Yes
?
Yes
?
Yes

Mobile

FeaturesAndroidFirefox MobileIE MobileOpera MobileSafari Mobile
Basic support
?
Yes
1.0
Yes
?
Yes
?
Yes
?
Yes

Examples

This example uses the dfn element to indicate the defining instance of a new term.

HTML

<p>The <dfn title="Garage Door Opener">GDO</dfn>
is a device that allows off-world teams to open the iris.</p>

This example uses the dfn element to indicate the defining instance of a new term that is an abbreviation.

HTML

<p>The <dfn><abbr title="Garage Door Opener">GDO</abbr></dfn>
is a device that allows off-world teams to open the iris.</p>
<!-- ... later in the document: -->
<p>Teal'c activated his <abbr>GDO</abbr>
and so Hammond ordered the iris to be opened.</p>

This example uses the dfn element to indicate the defining instance of a new term and then uses an anchor to provide a reference to that instance.

HTML

<p>The <dfn id="dfn-gdo"><abbr title="Garage Door Opener">GDO</abbr></dfn>
is a device that allows off-world teams to open the iris.</p>
<!-- ... later in the document: -->
<p>Teal'c activated his <a href="#dfn-gdo"><abbr>GDO</abbr></a>
and so Hammond ordered the iris to be opened.</p>

Usage

The dfn is a phrasing-level element and can’t contain block-level elements, but it can contain other phrasing type elements like abbr, read on…

If the dfn element has a title attribute, then the value of that attribute serves as the definition for the text inside the element (see Example 1).

If the dfn contains exactly one child element (and no other text) //and// that child element is an abbr element with a title attribute, then the exact value of that title attribute serves as the definition for the text inside the abbr (see Example 2).

If the dfn only contains text, the exact text content of the element gives the term being defined.

If the title attribute of the dfn element is present, then it must contain only the definition of the term being defined.

Notes

If given an id attribute, a dfn may serve as a reference for other elements on the page by anchoring to the dfn (see Example 3).


Related specifications

Specification Status Related Changes
HTML 5.1 W3C Working Draft
HTML 5 W3C Recommendation
HTML 4.01 W3C Recommendation

See also

Related articles

HTML





































  • dfn














… further results

Text





































  • dfn












Other articles

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]