HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
3823<optgroup> example2009-09-13 09:35
@@ -40404,20 +40404,50 @@ You cannot complete this form until the field is correct.</samp></pre>
   <div class="impl">
 
   <p>The <dfn
   title="dom-optgroup-disabled"><code>disabled</code></dfn> and <dfn
   title="dom-optgroup-label"><code>label</code></dfn> attributes must
   <span>reflect</span> the respective content attributes of the same
   name.</p>
 
   </div>
 
+  <div class="example">
+
+   <p>The following snippet shows how a set of lessons from three
+   courses could be offered in a <code>select</code> drop-down
+   widget:</p>
+
+   <pre>&lt;form action="courseselector.dll" method="get">
+ &lt;p>Which course would you like to watch today?
+ &lt;p>&lt;label>Course:
+  &lt;select name="c">
+   &lt;optgroup label="8.01 Physics I: Classical Mechanics">
+    &lt;option value="8.01.1">Lecture 01: Powers of Ten
+    &lt;option value="8.01.2">Lecture 02: 1D Kinematics
+    &lt;option value="8.01.3">Lecture 03: Vectors
+   &lt;optgroup label="8.02 Electricity and Magnestism">
+    &lt;option value="8.02.1">Lecture 01: What holds our world together?
+    &lt;option value="8.02.2">Lecture 02: Electric Field
+    &lt;option value="8.02.3">Lecture 03: Electric Flux
+   &lt;optgroup label="8.03 Physics III: Vibrations and Waves">
+    &lt;option value="8.03.1">Lecture 01: Periodic Phenomenon
+    &lt;option value="8.03.2">Lecture 02: Beats
+    &lt;option value="8.03.3">Lecture 03: Forced Oscillations with Damping
+  &lt;/select>
+ &lt;/label>
+ &lt;p>&lt;input type=submit value="&#x25B6; Play">
+&lt;/form></pre>
+
+  </div>
+
+
 
   <h4>The <dfn><code>option</code></dfn> element</h4>
 
   <dl class="element">
    <dt>Categories</dt>
    <dd>None.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>As a child of a <code>select</code> element.</dd>
    <dd>As a child of a <code>datalist</code> element.</dd>
    <dd>As a child of an <code>optgroup</code> element.</dd>

|