Forum Moderators: open
5.1 For data tables, identify row and column headers. [Priority 1]
For example, in HTML, use TD to identify data cells and TH to identify headers.
Techniques for checkpoint 5.1
on [w3.org...]
?
<table>
<tr>
<td>Robin</td><td>300</td>
</tr>
<tr>
<td>Ahmed</td><td>400</td>
</tr>
</table> You'd want to add headers to show up what the columns mean. To do this you'd use th elements (table header):
<table>
<tr>
<th>Username</th><th>Post count</th>
</tr>
<tr>
<td>Robin</td><td>300</td>
</tr>
<tr>
<td>Ahmed</td><td>400</td>
</tr>
</table> Of course, if you want to go more accessible still you'd add some more features. For example:
<table summary="A table containing a list of users and their respective post counts">
<caption>User details</caption>
<thead>
<tr>
<th scope="col">Username</th><th scope="col">Post count</th>
</tr>
</thead>
<tbody>
<tr>
<td>Robin</td><td>300</td>
</tr>
<tr>
<td>Ahmed</td><td>400</td>
</tr>
</tbody>
</table>
The headers would therefore be Name, Sex and Age
So, you might markup your table like so:
<table>
<caption>Peoples Data</caption>
<tr><th>Name</th><th>Sex</th><th>Age</th></tr>
<tr><td>Joe</td><td>Male</td><td>21</td></tr>
etc etc
</table>
HTH
Ben
added: Alternatively, see robins much more thorough post above :)