Example for Checkpoint
5.1 - For data tables, identify row and column headers.

Slide 43 of 120
Previous slide. Next slide.

Priority 1

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:

Example of a simple data table created using HTML markup.
Column 1 headerColumn 2 header
Row 1 headerColumn 1 Row 1Column 2 Row 1
Row 2 headerColumn 1 Row 2Column 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).

Up one level To Checkpoints for Guideline 5.
Next slide: Example for Checkpoint 5.1 continues

Introduction: Overview Guidelines: Overview Checkpoints: Overview Examples: Overview

Previous page. Next page.

Chuck Letourneau & Geoff Freed

W3C Web Accessibility Initiative

Copyright © 2000 W3C