The <th> element defines a table header cell. It must be a child of <tr> inside a <table>. Use it for column or row labels. Put data values in <td>.
Tell assistive technology what the header covers with scope (col, row, colgroup, or rowgroup). Span cells with colspan / rowspan, and use headers for complex associations. An optional abbr can give a short label for the header.
Baseline · Widely available.
Not deprecated. Core th support has been stable across browsers since about July 2015 (and much earlier in practice).
Deprecated attributes.
Do not use align, axis, bgcolor, char, charoff, height, valign, or width on <th>. Prefer CSS, and use scope instead of axis.
Syntax
HTML Syntax
syntax.html
<th scope="col|row">label</th>
The start tag is required. The end tag may be omitted in some cases, but writing both is clearer. Content is flow content, without headings, sectioning content, header, or footer descendants.
Visible text stays long; abbr is a shorter label some tools may use.
How It Works
Keep a clear visible header for sighted users.
Add abbr="…" with a short alternative when helpful.
Some assistive tools may prefer the short form when announcing the cell.
Do not rely on abbr alone — the visible text should still make sense.
Edge Cases & Pitfalls
Most th mistakes are fake headers, missing scope, or overlapping spans.
semantics
Do not fake headers with bold td
Screen readers need real <th> cells. Visual boldness is not enough.
scope
Prefer explicit scope
Inference works in simple tables, but scope="col" / scope="row" is clearer and more reliable.
spans
Never overlap cells
colspan / rowspan must leave a valid grid. Overlaps are invalid.
complex
Use headers for multi-level heads
When scope alone is not enough, link cells with id + headers, or split into simpler tables.
attrs
Skip presentational attributes
width, align, and bgcolor are deprecated. Style headers with CSS.
Compatibility
Browser Support
The <th> element is core HTML table markup in every browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<th>
Widely available since about July 2015 (and long before). scope, colspan, rowspan, abbr, and headers are broadly supported. Presentational attributes are obsolete.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
<th>Widely supported
Bottom line: Safe to use for table headers. Prefer real th cells with clear scope, keep spans simple, and style with CSS.
Remember
Key Takeaways
Role:<th> marks a header for related table cells.
vs td: labels → th; values → td.
scope: use col / row (and groups when needed).
Spans:colspan / rowspan without overlapping cells.
One line: put column and row labels in <th> with a clear scope, and keep data in <td>.
UA style
Default CSS Settings
Typical user-agent styling for th (simplified; exact rules vary by browser):
Many designs set text-align: left on headers and add borders with border-collapse: collapse on the table.
Frequently Asked Questions
The th element is a table header cell. Use it for column or row labels so browsers and screen readers treat those cells as headings for related data.
th is a header cell. td is a normal data cell. Bold text inside a td is not a real header for accessibility.
scope tells which cells the header relates to: col for a column, row for a row, and colgroup or rowgroup for a group. Specifying it helps assistive technology.
In simple tables browsers often infer scope, but setting scope="col" or scope="row" is a clear, recommended habit.
In complex tables with multi-level headers, give each th an id and list related ids in the headers attribute on related cells.
No. th is only valid as a child of tr inside a table.