- From: Scott Rippon <Scott.Rippon@arts.monash.edu.au>
- Date: Thu, 30 Oct 2003 11:31:04 +1100
- To: www-html@w3.org
Dear David
Thanks for your feedback. Is the below example the correct way that
sub-sections should be shown in a HTML table?
Just a couple of question:
1. Have I got the <thead> <tbody> elements in the correct location?
2. Will the rowspan cause difficulty for screen readers?
(http://www.webaim.org/techniques/tables/2#spanned)
You are right in that I didn't use <th> for the sub-section headings in
my first example when I should have. This was because of my
misunderstanding of the <th> element. Whilst the sub-section headings
are "header information" I think I was wanting to distinguish between
the table headings (what I see as level 1) and table sub-headings (level
2) using the <th> doesn't show this distinction.
I guess also when I'm creating tables in a word processor I don't put an
extra column down the left hand side. I format them as I formatted my
first example. I thought using the <caption> would allow people greater
flexibility possibly through using CSS2 caption-side.
Kind regards,
Scott Rippon.
<table
summary="This table is an example of a table containing subsections.
In our example the 2 sub-section each contain sub-section headings.">
<caption>
Example Table
</caption>
<thead>
<tr>
<th scope="col"> </th>
<th scope="col">Table Heading 1</th>
<th scope="col">Table Heading 2</th>
<th scope="col">Table Heading 3</th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="2" scope="row">Sub-section Heading 1</th>
<td>S1C1R1</td>
<td>S1C2R1</td>
<td>S1C3R1</td>
</tr>
<tr>
<td>S1C1R2</td>
<td>S1C2R2</td>
<td>S1C3R2</td>
</tr>
<tr>
<th rowspan="2" scope="row">Sub-section Heading 2</th>
<td>S2C1R1</td>
<td>S2C2R1</td>
<td>S2C3R1</td>
</tr>
<tr>
<td>S2C1R2</td>
<td>S2C2R2</td>
<td>S2C3R2</td>
</tr>
</tbody>
</table>
Received on Wednesday, 29 October 2003 19:39:08 UTC