Accessible Tables

Jason Morningstar

UNC Chapel Hill | ITS Communications | Web Services

Goals

Layout Tables

More on Layout Tables

Tabular Data

Using the <th> and <td> Tags

Header Example

The column headers (<th>) for this table are Name, Age, and Birthday. The row headers (<td>)are Jackie and Beth.

Shelly's Daughters
Name Age Birthday
Jackie 5 April 5
Beth 8 January 14

Associate Data Cells With Headers

SCOPE: The Easy Way!

SCOPE Example

<table border="1" align="center">
<caption>Shelly's Daughters</caption>
<tr>
<th scope="col" >Name</th>
<th scope="col" >Age</th>
<th scope="col" >Birthday</th>
</tr>
<tr>
<th scope="row" >Jackie</th>
<td>5</td>
<td>April 5</td>
</tr>
<tr>
<th scope="row" >Beth</th>
<td>8</td>
<td>January 14</td>
</tr>
</table>

ID: The Complicated Way

ID Example, Part One

Shelly's Daughters
  Name Age Birthday
by birth Jackie 5 April 5
Beth 8 January 14
by marriage Jenny 12 Feb 12

ID Example, Part Two

<table border="1">
<caption>
Shelly's Daughters
</caption>
<tr>
<td>&nbsp;</td>
<th id="name">Name</th>
<th id="age">Age</th>
<th id="birthday">Birthday</th>
</tr>
<tr>
<th rowspan="2" id="birth">by birth</th>
<th id="jackie">Jackie</th>
<td headers="birth jackie age">5</td>
<td headers="birth jackie birthday">April 5</td>
</tr>
(SNIP)

Beware!

Absolute Vs. Relative Values

Use the <caption> Tag!

More on <caption>

The <summary> Attribute