4.5.8 The dfn element
4.5.8 The dfn element
Категории:
потоковое содержимое.
Фразовое содержимое.
Palpable content.
Контексты, в которых может использоваться этот элемент:
Где ожидается Фразовое содержимое.
Контентная модель:
Phrasing content, but there must be no dfn element descendants.
Опущение тегов в text/html:
Ни один из тегов не может быть опущен.
Атрибуты контента:
глобальные атрибуты
Also, the title attribute has special semantics on this element: Full term or expansion of abbreviation
Специфика доступности:
Для авторов.
Для разработчиков.
Санитизация:
Default.
DOM-интерфейс:
Uses HTMLElement.
The dfn element represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element.
Defining term: if the dfn element has a title attribute, then the exact value of that attribute is the term being defined. Otherwise, if it contains exactly one element child node and no child Text nodes, and that child element is an abbr element with a title attribute, then the exact value of that attribute is the term being defined. Otherwise, it is the descendant text content of the dfn element that gives the term being defined.
If the title attribute of the dfn element is present, then it must contain only the term being defined.
The title attribute of ancestor elements does not affect dfn elements.
An a element that links to a dfn element represents an instance of the term defined by the dfn element.
In the following fragment, the term "Garage Door Opener" is first defined in the first paragraph, then used in the second. In both cases, its abbreviation is what is actually displayed.
<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 title="Garage Door Opener">GDO</abbr>
and so Hammond ordered the iris to be opened.</p>
With the addition of an a element, the reference can be made explicit:
<p>The <dfn id=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=#gdo><abbr title="Garage Door Opener">GDO</abbr></a>
and so Hammond ordered the iris to be opened.</p>