Example for scope=rowgroup. (whatwg r3310)

Example for scope=rowgroup. (whatwg r3310)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2454&r2=1.2455&f=h
http://html5.org/tools/web-apps-tracker?from=3309&to=3310

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2454
retrieving revision 1.2455
diff -u -d -r1.2454 -r1.2455
--- Overview.html 23 Jun 2009 19:55:37 -0000 1.2454
+++ Overview.html 24 Jun 2009 01:12:36 -0000 1.2455
@@ -167,7 +167,7 @@
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
    <!--ZZZ:-->
    <!--<h2 class="no-num no-toc">W3C Working Draft 23 April 2009</h2>-->
-   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 23 June 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 24 June 2009</h2>
    <!--:ZZZ-->
    <dl><!-- ZZZ: update the month/day (twice), (un)comment out
     <dt>This Version:</dt>
@@ -260,7 +260,7 @@
   track.
   <!--ZZZ:-->
   <!--This specification is the 23 April 2009 Working Draft.-->
-  This specification is the 23 June 2009 Editor's Draft.
+  This specification is the 24 June 2009 Editor's Draft.
   <!--:ZZZ-->
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -23306,7 +23306,46 @@
   attribute must <a href="#reflect">reflect</a> the content attribute of the
   same name.</p>
 
-  </div><h4 id="attributes-common-to-td-and-th-elements"><span class="secno">4.9.12 </span>Attributes common to <code><a href="#the-td-element">td</a></code> and <code><a href="#the-th-element">th</a></code> elements</h4><p>The <code><a href="#the-td-element">td</a></code> and <code><a href="#the-th-element">th</a></code> elements may have a <dfn id="attr-tdth-colspan" title="attr-tdth-colspan"><code>colspan</code></dfn> content
+  </div><div class="example">
+
+   <p>The following example shows how the <code title="attr-th-scope"><a href="#attr-th-scope">scope</a></code> attribute's <code title="attr-th-scope-rowgroup"><a href="#attr-th-scope-rowgroup">rowgroup</a></code> value affects which
+   data cells a header cell applies to.</p>
+
+   <p>Here is a markup fragment showing a table:</p>
+
+   <pre>&lt;table&gt;
+ &lt;thead&gt;
+  &lt;tr&gt; &lt;th&gt; ID &lt;th&gt; Measurement &lt;th&gt; Average &lt;th&gt; Maximum
+ &lt;tbody&gt;
+  &lt;tr&gt; &lt;td&gt; &lt;th scope=rowgroup&gt; Cats &lt;td&gt; &lt;td&gt;
+  &lt;tr&gt; &lt;td&gt; 93 &lt;td&gt; Legs &lt;td&gt; 3.5 &lt;td&gt; 4
+  &lt;tr&gt; &lt;td&gt; 10 &lt;td&gt; Tails &lt;td&gt; 1 &lt;td&gt; 1
+ &lt;tbody&gt;
+  &lt;tr&gt; &lt;td&gt; &lt;th scope=rowgroup&gt; English speakers &lt;td&gt; &lt;td&gt;
+  &lt;tr&gt; &lt;td&gt; 32 &lt;td&gt; Legs &lt;td&gt; 2.67 &lt;td&gt; 4
+  &lt;tr&gt; &lt;td&gt; 35 &lt;td&gt; Tails &lt;td&gt; 0.33 &lt;td&gt; 1
+&lt;/table&gt;</pre>
+
+   <p>This would result in the following table:</p>
+
+   <table><thead><tr><th> ID <th> Measurement <th> Average <th> Maximum
+    <tbody><tr><td> <th scope="rowgroup"> Cats <td> <td>
+     <tr><td> 93 <th> Legs <td> 3.5 <td> 4
+     <tr><td> 10 <th> Tails <td> 1 <td> 1
+    <tbody><tr><td> <th scope="rowgroup"> English speakers <td> <td>
+     <tr><td> 32 <th> Legs <td> 2.67 <td> 4
+     <tr><td> 35 <th> Tails <td> 0.33 <td> 1
+   </table><p>The headers in the first row all apply directly down to the rows
+   in their column.</p>
+
+   <p>The headers with the explicit <code title="attr-th-scope"><a href="#attr-th-scope">scope</a></code> attributes apply to all the
+   cells in their row group other than the cells in the first column.</p>
+
+   <p>The remaining headers apply just to the cells to the right of
+   them.</p>
+
+   <!-- image source: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/151 -->
+   <img alt="" src="images/table-scope-diagram.png"><!-- (alt is empty because the diagram is completely described by the previous paragraphs) --></div><h4 id="attributes-common-to-td-and-th-elements"><span class="secno">4.9.12 </span>Attributes common to <code><a href="#the-td-element">td</a></code> and <code><a href="#the-th-element">th</a></code> elements</h4><p>The <code><a href="#the-td-element">td</a></code> and <code><a href="#the-th-element">th</a></code> elements may have a <dfn id="attr-tdth-colspan" title="attr-tdth-colspan"><code>colspan</code></dfn> content
   attribute specified, whose value must be a <a href="#valid-non-negative-integer">valid non-negative
   integer</a> greater than zero.<p>The <code><a href="#the-td-element">td</a></code> and <code><a href="#the-th-element">th</a></code> elements may also have a
   <dfn id="attr-tdth-rowspan" title="attr-tdth-rowspan"><code>rowspan</code></dfn> content

Received on Wednesday, 24 June 2009 01:13:40 UTC