New Zealand Government Web Standards

11.1 Table row and column headers

New standards released

The New Zealand Web Standards 2.0 were released in March 2009 and replace the previous version, the New Zealand Government Web Standards 1.0 (below).  See Meeting the standards for more information.

The Standard

11.1 For data tables, identify row and column headers.

Guide to this standard

Use the <TH> element in tables for cells that serve as headers in rows or columns, rather than <TD>, which should be used for cells containing data or cells that are empty.

User agents (including assistive technologies) can render header cells distinctly from data cells even when style sheets are not used. For example, a visual browser might bold the text in header cells, while a speech synthesiser might pronounce the header text with a different inflection and/or repeat the header information for each data cell in a row.

Style sheets can be used to style the visual appearance and alignment of text in cells marked as headers.

Where a cell’s contents serve as both data and header information for other cells, you can use the <TD> element and use the “id" and "header" attributes or "scope" attribute for <TD> to associate data cells and header cells.

This standard covers the W3C WAI checkpoint 5.1 for NZ government agencies.

Rationale for this standard

Users who rely on assistive technologies, particularly those with visual impairments, can either not see, or have difficulty seeing the structure of a table. In such cases identifying row and column headers enables the assistive technology device to describe to the user the structure of a table.