HTML / Element / Initial coverage

The <table> Element

Status: Initial coverage Scope: HTML Living Standard Checked: 2026-09-12

Technical Summary

The table element represents multidimensional data as a table and participates in a table model formed by descendant rows, columns, and cells. Rows and columns form a grid, and cells must cover that grid without overlap.

A table represents data relationships; it is not a general-purpose page-layout container. Use CSS Grid, Flexbox, or another CSS layout system for layout.

Definition / Content model

Main ordering defined by the HTML Standard
PositionElementMeaningCondition
1captionA description of the tableOptional; first
2colgroupA group of columnsZero or more
3theadA group of heading rowsOptional
4tbody or trThe table bodyZero or more tbody, or one or more tr
5tfootA group of footer rowsOptional

The table content model has this order. Script-supporting elements can be interspersed where the model permits them. Neither the table start tag nor its end tag is omissible.

Table model

The table model is not simply a copy of the source markup's visual nesting. Rows and columns form a grid, and cells occupy slots in that grid.

source markup
  ↓ rows / columns / cells
table grid
  ↓ cell slots and spanning relationships
table model
  • GridRows and columns form a two-dimensional grid.
  • CellsCells cover the grid without overlapping one another.
  • SpanAll branches involving rowspan and colspan require further detailed review.

Header / Data cell relationships

Heading relationships in a simple table
MarkupRoleRelationshipUse it for
th scope="col"Column headerDescribes cells in a columnPrices, dates, item names
th scope="row"Row headerDescribes data in a rowDays, products, regions
tdData cellContains data described by headersValues, states, descriptions
id + headersExplicit associationAssociates headers explicitly in a complex tableMultiple heading levels or axes

Heading relationships are structural; they are not created by bold text or borders. In a simple table, scope is a readable starting point. In a complex table, simplify the structure where possible and use id and headers when an explicit association is needed.

Parser recovery boundary

The HTML parser does not always copy source nesting directly into the DOM. For example, a td directly under tbody is a parse error. In the table-body context, the tree builder can insert an implied tr and then reprocess the td token through a recovery branch.

<table>
  <tbody>
    <td>source cell</td>
  </tbody>
</table>

possible DOM shape after recovery:
table → tbody → tr → td

Source-markup parentage and the DOM tree after parsing are therefore separate inspection targets. Conformance and observed parser recovery should not be treated as the same claim.

DOM interface

A table element is exposed through the HTMLTableElement interface. The interface defines surfaces such as caption, tHead, tFoot, tBodies, and rows, as well as operations such as createTBody() and insertRow().

const table = document.querySelector('table');
table.caption;
table.tBodies;
table.rows;
table.insertRow(-1);

DOM API results depend on the DOM tree constructed by the parser and on the runtime state created by later operations, not only on the original source text.

Fact / Evidence

Key facts are mapped to their conditions, review status, and evidence locations. Unresolved scope remains visible in the Coverage section below.

Key facts and evidence locations
TypeFactCondition / ScopeStatusEvidence
SPECThe table element represents data relationships, not general page layout.Use it for row-and-column data; use CSS layout systems for page layout.ReviewedHTML Standard: the table element
SPECThe table content model has the order caption, colgroup, thead, table body, and tfoot.The body is zero or more tbody elements, or one or more tr elements.ReviewedHTML Standard: the table element
SPECRows, columns, and cells form a table grid whose slots are covered without overlap.rowspan and colspan affect the grid and require branch-specific review.ReviewedHTML Standard: forming a table
SPECth and its heading relationships describe the data cells in a simple or complex table.Use scope for simple row or column headers; use id and headers when explicit associations are needed.ReviewedHTML Standard: header and data-cell semantics
SPECThe parser can insert an implied tr when a td appears directly in a table-body context.This is a parse-error recovery path; source nesting and the resulting DOM must be inspected separately.ReviewedHTML Standard: in table body

Evidence

  1. HTML Standard: The table element — meaning, content model, table model, layout-table boundary, and DOM interface
  2. HTML Standard: Forming a table — formation of table grids, rows, columns, cells, and slots
  3. HTML Standard: Header and data cell semantics — header and data-cell relationships
  4. HTML Standard: The table-body insertion mode — token processing and recovery boundaries in table contexts
  5. HTML Accessibility API Mappings: table — an entry point for platform accessibility mapping

Implementation Evidence

Implementation observations are recorded separately from normative claims. Unrun items are not treated as reviewed.

Shared fixture / environment: A table omitting tbody with scoped headers, rowspan="2", and headers. Chrome 152.0.0.0 / Windows NT 10.0 / checked 2026-09-13.

Implementation evidence register for the table element
TypeReproducible scopeRecord requiredStatus
IMPLParser recovery, table grid, rowspan/colspan, and constructed header relationshipsChrome 152.0.0.0 / Windows NT 10.0 / 2026-09-13. The omitted tbody was inserted implicitly; the result had three rows, rowspan=2, and colspan=1. The scope values (col/row) and td[headers]="h1 r1" were retained.Reviewed
WPTTests related to table parsing, grid formation, and header associationMapped to foster-parenting-moved-table.window.js, rowspan-0.html, col-span-limits.html, and cells.html. On 2026-09-15 in Chrome 152.0.0.0 / Windows NT 10.0, rowspan and cells passed 3/3, while col-span passed 3/5 (two width assertions differed from Chromium's measured values). foster-parenting-moved-table.window.js could not be opened by the browser runner and remains unrun.Partial (6/8 pass)
AAMAccessibility-tree observations for table, row, column, and header relationshipsChrome 152.0.0.0 / Windows NT 10.0 / 2026-09-13. The AX tree exposed a table, rows, and cells with their names. In this Chromium tree, the th elements appeared as cells rather than separate columnheader / rowheader roles, so complete header mapping is not claimed.Observed

Use the WPT repository for test mapping and HTML-AAM for accessibility criteria.

Coverage / Open Issues

  • ReviewedThe element's meaning, content model, basic table grid, simple header/data relationships, and the main HTMLTableElement surface
  • ReviewedThe implied-row parser recovery boundary in the table-body context
  • OpenAll rowspan/colspan branches, the complete table-model algorithm, and complex header association
  • OpenThis AX observation covers one Chrome environment only. Complete HTML-AAM mapping, assistive-technology observations, browser divergence, WPT, and historical changes remain unregistered.
  • OpenThe implementation boundary between CSS table layout and the HTML table model, compatibility, and Expert-gap Review

This page is initial coverage. It does not claim that every fact about the table element has been verified or that every implementation produces the same result.

Related surface

For a minimal example, headings, and responsive-table guidance, see the table element page in Yugien.