Example for Checkpoint |
This checkpoint is telling you that if you have a legitimate need to present data in a tabular format, then you should use the HTML TABLE element and its supporting elements and attributes (like TR, TD, TH and CAPTION). The alternatives (such as using the PRE tag for preformatted text or using style sheets) will actually make understanding of tabular data more difficult for users of assistive technology.
A simple data table created with proper data table mark up, might look like this:
Column 1 header | Column 2 header | |
---|---|---|
Row 1 header | Column 1 Row 1 | Column 2 Row 1 |
Row 2 header | Column 1 Row 2 | Column 2 Row 2 |
See the code that created this table.
The above example is preferable to the using the <PRE> element to layout the data, because future browsers will use the TH and other TABLE markup to logically linearize tables.
Note: if you are using tables for page layout (instead of CSS), then you should NOT use markup reserved for data tables (like TH, HEADER, SCOPE, COLGROUP, etc.) because those elements will be used by some agents to identify and manipulate data).
To Checkpoints for Guideline 5.
|