HTML / Element / Initial coverage

The <td> Element

Status: Initial coverage Scope: HTML Living Standard Specification checked: 2026-10-11

Technical Summary

td represents a data cell in a table. Its meaning differs from th, which represents a heading cell. The cell, its row and column, colspan, rowspan, and header associations contribute to cell positions and relationships in the table model.

A conforming headers value refers to IDs of th elements in the same table. DOM reflection, the specified header list, a browser accessibility tree, and assistive-technology speech are separate things to verify.

Definition / Content model

Basic definition of the td element
ItemDefinitionCondition / scope
MeaningA data cell in a tableth has the heading-cell meaning
ContextChild of a tr elementParticipates in the table model as a cell
Content modelFlow content (general content such as text, paragraphs, and lists)Each parent and child element has its own placement rules
CategoriesBelongs to no specific content categoryIts table-cell meaning is defined separately
End tagMay be omitted in text/html under conditionsWhen immediately followed by td or th, or when no content remains in the parent
DOM interfaceHTMLTableCellElementThe th element uses the same interface

The standard permits omitting an end tag in some cases. In hand-written HTML, explicit tags make cell boundaries easier to follow. This is a choice for clarity; permitted omitted-tag markup is not automatically non-conforming.

Here, the table model means the rules HTML uses to place rows, columns, and cells and to detect overlap.

Span attributes and headers

Main attributes of td
AttributeSpecified meaningIDL and boundary
colspanNumber of columns occupied by the cellcolSpan ranges from 1 to 1000; missing and invalid values default to 1
rowspanNumber of rows occupied by the cellrowSpan ranges from 0 to 65534; 0 spans the remaining rows in the same row group
headersIDs of related header cellsUnique, space-separated tokens; each token refers to a th in the same table

colspan is a positive integer up to 1000. rowspan is from 0 through 65534. The standard also sets how missing or invalid values work and what happens when JavaScript changes the DOM property. rowspan="0" does not mean zero rows: it spans the remaining rows in the same row group.

Spans change which positions a cell occupies in the table grid. A structure where cells overlap is a table model error. The fact that an HTML parser built a DOM does not by itself prove that the source markup conforms or that the table model is valid.

headers participates in specified table relationships; it is more than an arbitrary text attribute. Conforming markup points to th elements in the same table and does not make a cell refer to itself as a heading. Reading the attribute from the DOM alone does not establish how browser or platform accessibility APIs expose the relationship.

JavaScript DOM properties and cellIndex

HTMLTableCellElement is the interface JavaScript uses to work with a cell. It provides the colSpan, rowSpan, and headers properties. The shared interface also has scope and abbr, but those HTML attributes are conforming on th, not td.

cellIndex is the cell's position in its parent tr's cells list. When an earlier cell spans rows or columns, this number is not necessarily the cell's horizontal position in the table grid. It returns -1 when the element is not in a tr.

const cell = document.querySelector("td");
cell.cellIndex;  // Position in the parent tr's cell list
cell.colSpan;    // IDL value for colspan
cell.rowSpan;    // IDL value for rowspan

Facts / Evidence

Standard requirements, Accessibility mappings, and browser observations are recorded separately. Results from a selected fixture or WPT subset do not guarantee behavior across all implementations and table structures.

Main facts and source locations for td
TypeFact / claimCondition / scopeStatusEvidence
SPECtd represents a data cell in a table, has a tr parent context, and has a Flow content model.Element meaning, context, and content model.ReviewedHTML Standard: the td element
SPECcolspan ranges from 1 to 1000; rowspan ranges from 0 to 65534 and defines cell spans in the table grid.rowspan="0" spans the remaining rows in its row group. Overlapping slots are a table model error.ReviewedHTML Standard: attributes common to td and th
SPECheaders references space-separated IDs of th elements in the same table and participates in header/data-cell relationships.Keep conformance requirements distinct from relationships formed by the processing algorithm.ReviewedHTML Standard: header and data cell semantics
AAMWhen the ancestor table role is table, the td role is cell; with grid or treegrid, it is gridcell.HTML-AAM role mapping; recorded separately from observations in a browser or platform API.Specification reviewedHTML-AAM: td

Evidence

  1. HTML Standard: The td element — meaning, context, content model, end tag, and IDL interface
  2. HTML Standard: Attributes common to td and th — colspan, rowspan, headers, and cellIndex
  3. HTML Standard: Header and data cell semantics — explicit and automatic header assignment
  4. HTML Standard: Forming a table — table grid, slots, and model errors
  5. HTML Accessibility API Mappings: td — computed role by ancestor table role

Implementation Evidence

Specification claims are separate from observations in selected browsers, WPT tests, and Accessibility trees. The records below are limited to the measured environment, fixture, and tests.

Implementation evidence registry for the td element
TypeReproduced scopeRecorded conditionsStatus
IMPL The td interface, cellIndex, and headers / colSpan / rowSpan IDL values 2026-10-11 JST (fixture run: 2026-10-10 16:00 UTC) / Chrome UA 155.0.0.0 / Windows NT 10.0 UA / viewport 870×668 / navigator.language=ja. Served build-config/yugien/research-results/td-v1/ from loopback 127.0.0.1:4195; 12/12 checks passed. Observed HTMLTableCellElement, row cellIndex=1, outside-row -1, colSpan default / zero / 1001 clamp, rowSpan default / invalid value / 65535 clamp / zero, headers reflection, and row cells.length. One Chrome environment only. OS build and other browsers were not recorded or measured. Partial observation (Chrome 155 / 12/12 checks)
WPT Selected WPTs for shared cellIndex, rowspan=0, and td colSpan boundaries 2026-10-11 JST / Chrome UA 155.0.0.0 / wpt.live rerun. cellIndex.html: 6/6 passed. rowspan-0.html: 2/2 passed. col-span-limits.html: 3/5 passed. Its three td.colSpan IDL assignment, HTML attribute parsing, and range-boundary checks passed. The other two checks test table width from the col element's span in the same file: expected 53 but got 51, and expected 51 but got 50. These are not td colspan assertion failures. Total for selected tests: 11/13 passed. The upstream revision served by wpt.live was not pinned; other browsers and unselected WPTs 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.

Partial run (selected WPTs: 11/13 passed; td attribute tests passed)
AAM Native table, row, data/header cells, and table name observed through browser role queries in Chrome 2026-10-11 JST / Chrome UA 155.0.0.0 / viewport 870×668. Browser role queries on the same fixture returned one table named Fruit prices today, three rows, two data cells, two columnheaders (Fruit and Price), two rowheaders (Apples and Oranges), and zero gridcells. The aria-hidden measurement table did not appear in the table role query. The headers relationship was not individually checked. Role query results do not establish every HTML-AAM mapping or platform API behavior. Windows UIA and NVDA or other screen-reader speech were not measured. Partial observation (Chrome 155 browser role queries / one environment)

WPT runs, browser Accessibility trees, platform accessibility APIs, and assistive-technology speech are separate evidence. No result is inferred for an unmeasured layer or combination.

Coverage / Open Issues

  • ReviewedMeaning, context, content model, main attributes and IDL boundaries, and HTML-AAM role mapping
  • OpenAll branches of header assignment, duplicate or missing IDs, and span boundaries / table model errors
  • OpenWPT tests outside the selected subset, other browsers, and differing row-group or nested-table structures
  • OpenPlatform accessibility APIs, speech and navigation with NVDA or other assistive technology, browser differences, and Expert-gap Review

This Topic is initial coverage. A specification mapping or result from one environment does not establish identical exposure or speech across browsers, operating systems, and assistive technologies.

Related surfaces

For a small beginner-friendly example, see How to Use the td Element. For heading meaning, scope, and headers, see the th Topic. For the table grid and parser recovery, see the table Topic; for its title, see the caption Topic.