Estimated reading time : 4 min · Published
Define units, scope and missing values
Use a title that identifies the subject, period and scope where relevant. Put units in headers or beside values. For prices, explain inclusions and comparison terms. Give missing values an explicit meaning instead of using zero, which could be mistaken for a measurement.
Compare like with like. Monthly and yearly values need explained conversion or separate columns. Mark quote-only offers accordingly. Sorting should not imply a precise ranking of values that represent different things.
Connect cells and their headers
The W3C table tutorials describe a data structure with header cells. The simple-header example uses row or column relationships to make values meaningful. Reduce complex groupings when a simpler structure is enough.
A reading table can contain links and buttons without becoming a full application grid. Cell selection or editing adds behavioural requirements. Do not adopt a grid model solely to colour a row or provide a sort button.
Separate a table’s title from an explanation of its structure. caption helps identify the table; an additional description can explain unusual groupings without repeating its title. For a simple structure, scope associates headers with rows or columns. A cell merged using colspan or rowspan does not by itself make every relationship explicit.
When multiple header levels cannot be described simply, headers references can identify the id values of the relevant header cells. Check that each identifier exists, remains unique and matches the cell being read. If the arrangement is difficult to explain, several simple tables may serve readers better. Visual formatting and row groups do not replace these associations in the final HTML.
Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.
| Mechanism | Useful role | Check to perform |
|---|---|---|
| caption | Identify the table’s subject. | An understandable title distinct from the structure explanation. |
| scope on a simple header | Associate a header with its row or column. | The relationship matches data meaning, not just visual position. |
| colspan or rowspan | Extend a cell across multiple positions. | Do not confuse visual span with complete header associations. |
| headers and id | Explicitly associate a cell with its headers in a complex case. | Existing references and unique identifiers, then check the published table. |
- W3C WAI : Table captions and summaries
Consulted on 22 October 2026; caption and structure descriptions without unnecessary repetition.
- W3C WAI : Multi-level headers
Consulted on 22 October 2026; explicit headers and id associations and options to simplify tables.
Plan sorting, mobile display and export
Identify the active sort column and direction. Test numbers, dates and missing values: text sorting may place 100 before 20. Retain row context after actions and explain whether export includes only the current page.
On mobile, compare a clearly indicated local scroll area with cards retaining field labels. Avoid shrinking all text until it becomes hard to read. Data requiring two-dimensional layout has a specific exception under the reflow criterion; surrounding content still needs to remain readable.
Example: compare hosting offers
Educational example: a table shows storage, backup, price and restoration terms. An unpublished price says “On quotation”. Price is sorted only when period and scope are comparable. Export retains units and qualifications; testing confirms that an absent value does not become zero.
Compare cells with the same meaning
A price column needs currency, tax basis and period. Distinguish zero, unavailable and not applicable rather than using the same dash. In a simple table, provide explicit row and column headers and retain its caption on mobile.
Reference documents
- W3C table tutorials · Source consulted
- simple-header example
- W3C WAI : Reflow
Content updated on
