Table Header & Scope Checker

Validate that your HTML tables have th elements with correct scope attributes.

Ad placeholder (leaderboard)

The Table Header & Scope Checker audits your HTML tables for the structure that makes them readable to assistive technology. A table that looks fine visually can be meaningless to a screen-reader user if the header cells and their relationships are not marked up correctly.

How it works

The tool parses your HTML and analyses each <table> it finds. For every table it reports on:

  • Header cells — does the table contain any th elements at all? A data table with none is a hard failure.
  • Scope — do the th cells carry scope="col" or scope="row"? Missing scope is flagged as a recommendation, especially when both row and column headers exist.
  • Caption — is there a <caption> giving the table a name? Recommended for all data tables.
  • Sections — are thead/tbody present to separate header rows from body rows?
  • Layout detection — a table with no th and no caption is flagged as a probable layout table.
  • Complex tablesth cells with colspan/rowspan are flagged so you can verify id/headers associations manually.

This maps to WCAG 1.3.1 (Info and Relationships).

Example

<table>
  <tr><th scope="col">Month</th><th scope="col">Revenue</th></tr>
  <tr><th scope="row">January</th><td>£4,200</td></tr>
</table>

This passes the core checks: it has th header cells with scope, and each data cell is associated with both a column and a row header. Adding a <caption> would resolve the remaining recommendation.

Notes

  • Use th only for genuine headers; do not style ordinary td cells to look like headers.
  • For merged-cell tables, prefer the explicit id + headers pattern over scope.
  • If a table is purely decorative layout, replace it with CSS grid or flexbox, or add role="presentation".
Ad placeholder (rectangle)