HTML / Element / Initial coverage

The <thead> Element

Status: Initial coverage Scope: HTML Living Standard Specification reviewed: 2026-10-17

Technical Summary

thead represents the row group of column labels and related ancillary cells for its parent table. A table can have zero or one direct thead child. It comes after any caption and colgroup elements and before the table body, tfoot, and direct tr children.

thead is a row group, distinct from th, which represents a header cell. HTML-AAM maps native thead to the rowgroup role. Cell roles and header/data relationships follow separate rules involving th, td, scope, and headers.

Definition, placement, and content model

Core definition of the thead element
PropertySpecificationConditions and scope
MeaningRow group of column labels and ancillary cellsDistinct from the header or data semantics of each cell
ContextChild of tableAfter caption and colgroup; before the table body, tfoot, and direct tr children; at most one direct child
Content modelZero or more tr and script-supporting elementsEach row may contain td or th cells
Start and end tagsStart tag is requiredEnd tag may be omitted only when immediately followed by tbody or tfoot
DOM interfaceHTMLTableSectionElementShared with tbody and tfoot
Specific attributesNoneGlobal attributes apply

HTML conformance and parser recovery are separate questions. A parser constructing a DOM from malformed input does not make that input conforming HTML.

thead, th, and the table model

Elements with distinct meanings inside a table
ElementStructural roleCell semantics
theadRow group in the heading sectionThe section alone does not make each cell a header cell
thCell in a rowHeader cell; scope and the header-assignment algorithm determine its associations
tbodyRow group in the table bodyA th inside it can serve as a row header
tdCell in a rowData cell

The HTML Standard's definition of thead allows ancillary non-header cells in addition to column-label rows. Do not infer header relationships from section membership alone; inspect the cell elements and table model.

Complex tables may involve th attributes scope, id, and headers, row and column groups, and cell spans. The section name thead alone does not determine every cell association or announcement order.

DOM constructed by the parser

<table id="schedule">
  <tr><th scope="col">Day</th></tr>
</table>

// DOM constructed by the HTML parser
table#schedule
└─ tbody  (inserted implicitly)
   └─ tr
      └─ th

In the table insertion mode, when a tr token occurs outside a permitted table section, the tree builder inserts an implied tbody and reprocesses the token. It does not infer thead from a th cell. For conforming authoring markup, make thead the explicit parent of heading rows.

HTMLTableSectionElement and table APIs

Main APIs used with thead
MemberResult or behaviorScope and boundary
table.tHeadReturns the first direct thead childReturns null when there is none
table.createTHead()Returns the first existing thead or a newly created sectionA new section is inserted after caption and colgroup
table.deleteTHead()Removes the first direct thead childDoes nothing when there is none
thead.rowsAn HTMLCollection of direct tr childrenLive collection; reflects row insertions and removals
thead.insertRow() / deleteRow()Insert or remove rows in the sectionIndexes are relative to rows in this section
const table = document.querySelector("table");
const head = table.tHead;              // Existing thead, or null
const sameHead = table.createTHead();  // Returns the existing section if present
head.rows.length;                      // Number of tr elements in thead

table.rows is the row collection for the whole table; thead.rows is the collection for the header section. Their names are similar, but their scopes differ. createTHead() creates a section; it does not create th cells or row content.

Accessibility mapping

HTML-AAM maps native thead to the WAI-ARIA rowgroup role. This exposes the header row-group structure; it does not assign header-cell roles to the cells in that group. Header cells are distinguished using th and table rules involving attributes such as scope.

The AAM measurement on this page uses Chrome browser role and name queries. It is not itself the normative HTML-AAM mapping, a record from a platform API such as Windows UI Automation, or an assistive-technology speech observation.

Facts and evidence

Normative specification claims, AAM mappings, and implementation results from selected environments are recorded separately.

Key facts and evidence locations for thead
TypeFactConditions / scopeStatusEvidence
SPECAt most one thead may be a table child; it follows caption/colgroup and precedes tbody, tfoot, and direct tr children. Its content model is tr and script-supporting elements.Element definition, ordering, tag omission, and HTMLTableSectionElement interface.ReviewedHTML Standard: the thead element
SPECWhen a tr token is processed in the table insertion mode as a table child, the parser inserts tbody. It does not infer thead from a th cell.Distinguishes parser construction/recovery from authoring conformance.ReviewedHTML Standard: in table insertion mode
SPECHTML-AAM maps native thead to the rowgroup role.Distinguishes normative mapping from browser accessibility trees, platform APIs, and assistive-technology output.ReviewedHTML-AAM: thead

Evidence

  1. HTML Standard: The thead element — context, content model, tag omission, and section interface
  2. HTML Standard: The table element — table child structure and APIs
  3. HTML Standard: The “in table” insertion mode — implied tbody insertion and token reprocessing
  4. HTML Accessibility API Mappings: thead — rowgroup mapping
  5. Web Platform Tests: the-thead-element/rows.html — section row collection
  6. Web Platform Tests: the-table-element/tHead.html — table.tHead behavior

Implementation evidence

Specification requirements, browser observations in selected environments, WPT runs, and accessibility role/name queries are recorded separately. Each result is limited to its stated fixture, browser, and test scope.

Implementation evidence register for thead
TypeReproducible scopeRecorded conditionsStatus
IMPL HTMLTableSectionElement, table.tHead, createTHead() / deleteTHead(), thead.rows / insertRow() / deleteRow(), parser handling of a direct tr, and an omitted end tag 2026-10-17 JST / Chrome UA 155.0.0.0 (Windows NT 10.0 UA) / viewport 1920×911 / navigator.language=en-US. Served build-config/yugien/research-results/thead-v1/ at loopback 127.0.0.1:4198; fixture checks passed 14/14. Confirmed the section interface, table.tHead, createTHead() with an existing section and its insertion position, the row collection and row APIs, parser insertion of tbody for a direct tr, and permitted end-tag omission. One Chrome environment only; other browsers, OS builds, and platform APIs were not measured. Partial observation (Chrome 155 / fixture 14/14)
WPT Selected WPTs for thead.rows and table.tHead / section APIs 2026-10-17 JST / Chrome UA 155.0.0.0 / wpt.live. rows.html: 1/1 passed; tHead.html: 3/3 passed. Total: 4/4 passed. The exact upstream revision served by wpt.live could not be pinned. Unselected tests and other browsers were not run.

The test version used was not recorded. The linked test may change, so this result cannot be repeated with certainty against the same version.

4/4 selected tests passed (wpt.live revision not pinned)
AAM Native table, row group, row, column header, row header, and data cell exposure through Chrome browser role/name queries 2026-10-17 JST / Chrome UA 155.0.0.0 (Windows NT 10.0 UA) / viewport 1920×911 / navigator.language=en-US. Queried the fixture table named Quarterly revenue and observed 1 table, 3 row groups (thead, tbody, and tfoot), 4 rows, 2 column headers, 2 row headers, and 3 cells. This is a browser role-query observation; Windows UI Automation and screen-reader speech were not measured. Partial observation (Chrome 155 browser role query / one environment)

Coverage and open issues

  • SPECElement meaning, placement, content model, tag omission, DOM interface, table parsing, table APIs, and HTML-AAM role mapping reviewed
  • IMPLLimited to the fixture and one Chrome environment. Other browsers, OS builds, and print behavior are unmeasured
  • WPTSelected tests only. The upstream revision served by wpt.live is not pinned; other browsers and the full directory are unchecked
  • AAMBrowser role/name queries measured. Platform accessibility APIs, assistive-technology speech, and cross-environment comparisons are untested
  • ReviewExpert-gap Review has not been completed

This Topic has initial coverage. Passing the selected fixture and tests does not establish the same result for every HTML structure, browser, operating system, or assistive technology.

Related surfaces

Column-group rules and measurements are covered in the colgroup Topic; a beginner-friendly example is in How to Use the colgroup Element.

For a beginner-friendly example, see How to Use the thead Element in Yugien. The whole table model is covered in the table Topic; header cells and cell associations in the th Topic; body row groups in the tbody Topic; summary row groups in the tfoot Topic; and row structure in the tr Topic.