Revision 81481 of <dfn>

  • Revision slug: HTML/Element/dfn
  • Revision title: dfn
  • Revision id: 81481
  • Created:
  • Creator: FreakCERS
  • Is current revision? No
  • Comment +ja, ul => ol ( following rules ), and some little fix; 31 words added

Revision Content

Summary

The Definition (<dfn>) HTML element represents the defining instance of a term.

HTML5 Usage Notes:
  • The <dfn> element marks the term being defined; the definition of the term should be given by the surrounding {{ HTMLElement("p") }}, {{ HTMLElement("section") }} or definition list group (usually a {{ HTMLElement("dt") }}, {{ HTMLElement("dd") }} pair).
  • The exact value of the term being defined is determined by the following rules:
    1. If the <dfn> element has a title attribute, then the term is the value of that attribute.
    2. Else, if it contains only an {{ HTMLElement("abbr") }} element with a {{ htmlattrxref("title", "abbr") }} attribute, then the term is the value of that attribute.
    3. Otherwise, the text content of the <dfn> element is the term being defined.

Attributes

Like all HTML elements, this element provides the global attributes. It defines no other attributes. In HTML5, the title attribute has special meaning, as noted above.

Examples

The following examples are valid in HTML5.

<!-- Define "The Internet" -->
<p><dfn id="def-internet">The Internet</dfn> is a global system of interconnected networks that use the Internet Protocol Suite (TCP/IP) to serve billions of users worldwide.</p>

Later in the same document:

<dl>
  <!-- Define "World-Wide Web" and reference definition for "the Internet" -->
  <dt>
    <dfn>
      <abbr title="World-Wide Web">WWW</abbr>
    </dfn>
  </dt>
  <dd>The World-Wide Web (WWW) is a system of interlinked hypertext documents accessed on <a href="#def-internet">the Internet</a>.</dd>
</dl>

DOM interface

This element implements the HTMLElement interface.

See also

  • Elements related to definition lists: {{ HTMLElement("dl") }}, {{ HTMLElement("dt") }}, {{ HTMLElement("dd") }}
  • {{ HTMLElement("abbr") }}
{{ languages({ "en": "en/HTML/Element/dfn", "ja": "ja/HTML/Element/dfn" }) }}

Revision Source

<h2 id="Summary">Summary</h2>
<p>The Definition (<code>&lt;dfn&gt;</code>) HTML element represents the defining instance of a term.</p>
<div class="note"><strong>HTML5 Usage Notes:</strong> <ul> <li>The <code>&lt;dfn&gt;</code> element marks the term being defined; the definition of the term should be given by the surrounding {{ HTMLElement("p") }}, {{ HTMLElement("section") }} or definition list group (usually a {{ HTMLElement("dt") }}, {{ HTMLElement("dd") }} pair).</li> <li>The exact value of the term being defined is determined by the following rules: <ol> <li>If the <code>&lt;dfn&gt;</code> element has a <strong>title</strong> attribute, then the term is the value of that attribute.</li> <li>Else, if it contains only an {{ HTMLElement("abbr") }} element with a {{ htmlattrxref("title", "abbr") }} attribute, then the term is the value of that attribute.</li> <li>Otherwise, the text content of the <code>&lt;dfn&gt;</code> element is the term being defined.</li> </ol> </li> </ul>
</div> <h2 id="Attributes">Attributes</h2>
<p>Like all HTML elements, this element provides the <a href="/en/HTML/Global_attributes" rel="internal">global attributes</a>. It defines no other attributes. In HTML5, the <strong>title</strong> attribute has special meaning, as noted above.</p> <h2 id="Examples">Examples</h2>
<p>The following examples are valid in HTML5.</p>
<pre class="brush: html">&lt;!-- Define "The Internet" --&gt;
&lt;p&gt;&lt;dfn id="def-internet"&gt;The Internet&lt;/dfn&gt; is a global system of interconnected networks that use the Internet Protocol Suite (TCP/IP) to serve billions of users worldwide.&lt;/p&gt;
</pre>
<p>Later in the same document:</p>
<pre class="brush: html">&lt;dl&gt;
  &lt;!-- Define "World-Wide Web" and reference definition for "the Internet" --&gt;
  &lt;dt&gt;
    &lt;dfn&gt;
      &lt;abbr title="World-Wide Web"&gt;WWW&lt;/abbr&gt;
    &lt;/dfn&gt;
  &lt;/dt&gt;
  &lt;dd&gt;The World-Wide Web (WWW) is a system of interlinked hypertext documents accessed on &lt;a href="#def-internet"&gt;the Internet&lt;/a&gt;.&lt;/dd&gt;
&lt;/dl&gt;
</pre> <h2 id="DOM_interface">DOM interface</h2>
<p>This element implements the <code><a href="/en/DOM/element" title="en/DOM/element">HTMLElement</a></code> interface.</p> <h2 id="See_also">See also</h2>
<ul> <li>Elements related to definition lists: {{ HTMLElement("dl") }}, {{ HTMLElement("dt") }}, {{ HTMLElement("dd") }}</li> <li>{{ HTMLElement("abbr") }}</li>
</ul> <div class="noinclude">{{ languages({ "en": "en/HTML/Element/dfn", "ja": "ja/HTML/Element/dfn" }) }}</div>
Revert to this revision