G. HTML Techniques

To add headers and scopes to a page from the HTML the first step is to identify the headers that you need to change to headers. A norm table data cell is a <TD> tag. To make that cell a header you must change the tag to a <TH> tag. The next step is to add a scope. If the header is describing cells below it, use a scope="col" attribute. If it is a row header add a scope="row" attribute.

For the following example:

NamesHomework 1Quiz 1Test 1
Bob 87% 86% 80%
Scott 92% 98% 94%
Tara 94% 82% 91%

The corrected code would look like:

<table width="440"> <tr>
<td></td>
<th scope="col">Homework 1</th>
<th scope="col">Quiz 1</th>
<th scope="col">Test 1</th>
</tr>
<tr> <th scope="row">Bob</th>
<td>87%</td>
<td>86%</td>
<td>80%</td>
</tr>
<tr> <th scope="row">Scott</th>
<td>92%</td>
<td>98%</td>
<td>94%</td>
</tr>
<tr> <th scope="row">Tara</th>
<td>94%</td>
<td>82%</td>
<td>91%</td>
</tr>
</table>

This page adopted from the Curriculum for Web Content Accessibility Guidelines 1.0, Copyright  ©  2000 W3C (MIT, INRIA, Keio), All Rights Reserved.