[html5] r2466 - [e] (0) Add some examples for <dfn> and <abbr>.

whatwg at whatwg.org whatwg at whatwg.org
Wed Nov 26 14:48:55 PST 2008


Author: ianh
Date: 2008-11-26 14:48:54 -0800 (Wed, 26 Nov 2008)
New Revision: 2466

Modified:
   index
   source
Log:
[e] (0) Add some examples for <dfn> and <abbr>.

Modified: index
===================================================================
--- index	2008-11-26 22:21:12 UTC (rev 2465)
+++ index	2008-11-26 22:48:54 UTC (rev 2466)
@@ -11572,7 +11572,29 @@
   description list (<code><a href=#the-dl-element>dl</a></code> element), and the discourse, or
   quote, part in a conversation (<code><a href=#the-dialog-element>dialog</a></code> element).</p>
 
+  <div class=example>
 
+   <p>A <code><a href=#the-dl-element>dl</a></code> can be used to define a vocabulary list, like
+   in a dictionary. In the following example, each entry, given by a
+   <code><a href=#the-dt-element>dt</a></code> with a <code><a href=#the-dfn-element>dfn</a></code>, has several
+   <code><a href=#the-dd-element>dd</a></code>s, showing the various parts of the definition.</p>
+
+   <!-- the actual pronunciations below are nonsense. -->
+   <pre><dl>
+ <dt><dfn>happiness</dfn></dt>
+ <dd class="pronunciation">/'hæ p. nes/</dd>
+ <dd class="part-of-speech"><i><abbr>n.</abbr></i></dd>
+ <dd>The state of being happy.</dd>
+ <dd>Good fortune; success. <q>Oh <b>happiness</b>! It worked!</q></dd>
+ <dt><dfn>rejoice</dfn></dt>
+ <dd class="pronunciation">/ri jois'/</dd>
+ <dd><i class="part-of-speech"><abbr>v.intr.</abbr></i> To be delighted oneself.</dd>
+ <dd><i class="part-of-speech"><abbr>v.tr.</abbr></i> To cause one to be delighted.</dd>
+</dl></pre>
+  </div>
+
+
+
   <h3 id=text-level-semantics><span class=secno>4.6 </span>Text-level semantics</h3><!-- XXX ew, find a better section name -->
 
   <h4 id=the-a-element><span class=secno>4.6.1 </span>The <dfn><code>a</code></dfn> element</h4>
@@ -12297,24 +12319,8 @@
 
   </div>
 
-<!--XXX
-> One useful line of retreat would be to specify that in the following
-> code, "the state of being happy" is unambiguously a definition of
-> "happiness" and not of any other subset of the <dt>.
->
->     <dl>
->       <dt><dfn>happiness</dfn> /'hæ p. nes/ <i><abbr>n.</abbr></i></dt>
->       <dd>the state of being happy</dd>
->     </dl>
->
-> This could be encouraged by "dt dfn {font-weight: bold; font-style:
-> normal;}" in browsers' default style sheets, which would be quite
-> backward-compatible because of the rarity of <dt><dfn> up to now.
-- mpt
--->
 
 
-
   <h4 id=the-abbr-element><span class=secno>4.6.9 </span>The <dfn><code>abbr</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
@@ -12343,6 +12349,13 @@
 unofficial collaboration of Web browser manufacturers and interested
 parties who wish to develop new technologies designed to allow authors
 to write and deploy Applications over the World Wide Web.</p></pre>
+   <p>An alternative way to write this would be:</p>
+   <pre><p>The <dfn id=whatwg>Web Hypertext Application Technology
+Working Group</dfn> (<abbr title="Web Hypertext Application
+Technology Working Group">WHATWG</abbr>) is a loose unofficial
+collaboration of Web browser manufacturers and interested parties who
+wish to develop new technologies designed to allow authors to write
+and deploy Applications over the World Wide Web.</p></pre>
   </div>
 
   <div class=example>

Modified: source
===================================================================
--- source	2008-11-26 22:21:12 UTC (rev 2465)
+++ source	2008-11-26 22:48:54 UTC (rev 2466)
@@ -12307,7 +12307,29 @@
   description list (<code>dl</code> element), and the discourse, or
   quote, part in a conversation (<code>dialog</code> element).</p>
 
+  <div class="example">
 
+   <p>A <code>dl</code> can be used to define a vocabulary list, like
+   in a dictionary. In the following example, each entry, given by a
+   <code>dt</code> with a <code>dfn</code>, has several
+   <code>dd</code>s, showing the various parts of the definition.</p>
+
+   <!-- the actual pronunciations below are nonsense. -->
+   <pre><dl>
+ <dt><dfn>happiness</dfn></dt>
+ <dd class="pronunciation">/'hæ p. nes/</dd>
+ <dd class="part-of-speech"><i><abbr>n.</abbr></i></dd>
+ <dd>The state of being happy.</dd>
+ <dd>Good fortune; success. <q>Oh <b>happiness</b>! It worked!</q></dd>
+ <dt><dfn>rejoice</dfn></dt>
+ <dd class="pronunciation">/ri jois'/</dd>
+ <dd><i class="part-of-speech"><abbr>v.intr.</abbr></i> To be delighted oneself.</dd>
+ <dd><i class="part-of-speech"><abbr>v.tr.</abbr></i> To cause one to be delighted.</dd>
+</dl></pre>
+  </div>
+
+
+
   <h3>Text-level semantics</h3><!-- XXX ew, find a better section name -->
 
   <h4>The <dfn><code>a</code></dfn> element</h4>
@@ -13096,24 +13118,8 @@
 
   </div>
 
-<!--XXX
-> One useful line of retreat would be to specify that in the following
-> code, "the state of being happy" is unambiguously a definition of
-> "happiness" and not of any other subset of the <dt>.
->
->     <dl>
->       <dt><dfn>happiness</dfn> /'hæ p. nes/ <i><abbr>n.</abbr></i></dt>
->       <dd>the state of being happy</dd>
->     </dl>
->
-> This could be encouraged by "dt dfn {font-weight: bold; font-style:
-> normal;}" in browsers' default style sheets, which would be quite
-> backward-compatible because of the rarity of <dt><dfn> up to now.
-- mpt
--->
 
 
-
   <h4>The <dfn><code>abbr</code></dfn> element</h4>
 
   <dl class="element">
@@ -13146,6 +13152,13 @@
 unofficial collaboration of Web browser manufacturers and interested
 parties who wish to develop new technologies designed to allow authors
 to write and deploy Applications over the World Wide Web.</p></pre>
+   <p>An alternative way to write this would be:</p>
+   <pre><p>The <dfn id=whatwg>Web Hypertext Application Technology
+Working Group</dfn> (<abbr title="Web Hypertext Application
+Technology Working Group">WHATWG</abbr>) is a loose unofficial
+collaboration of Web browser manufacturers and interested parties who
+wish to develop new technologies designed to allow authors to write
+and deploy Applications over the World Wide Web.</p></pre>
   </div>
 
   <div class="example">




More information about the Commit-Watchers mailing list