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

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).


Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related articles

HTML






































  • html/elements/dfn













… further results

Text










































  • html/elements/dfn









… further results


Related pages (MSDN)

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]