TablesBaseline · Widely available
The <table> HTML element, with several related elements, represents tabular data in rows and columns of cells.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.
Browser support
DesktopChrome
1+Supportedsince Dec 11, 2008
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1+Supportedsince Nov 9, 2004
Current: 157Safari
1+Supportedsince Jun 23, 2003
Current: 27MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1+Supportedsince Jun 29, 2007
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: HTMLTableCaptionElement.
Feature detection
JS · check before using
const el = document.createElement("table");
if (!(el instanceof HTMLUnknownElement)) {
// <table> is supported
}Sub-features
Support for each part of the feature (75). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLTableCaptionElement | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.abbr | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.cellIndex | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.colSpan | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.headers | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.rowSpan | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.scope | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableColElement | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableColElement.span | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.caption | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.createCaption | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.createTBody | 20 | 12 | 25 | 6 | 25 | 25 | 6 |
| HTMLTableElement.createTFoot | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.createTHead | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.deleteCaption | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.deleteRow | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.deleteTFoot | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.deleteTHead | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
Show 55 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLTableElement.insertRow | 1 | 12 | 1 | 4 | 18 | 4 | 3 |
| HTMLTableElement.rows | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.tBodies | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.tFoot | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.tHead | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.cells | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.deleteCell | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.insertCell | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.insertCell.index_parameter_negative_one | 1 | 12 | 20 | 3 | 18 | 20 | 1 |
| HTMLTableRowElement.insertCell.index_parameter_optional | 1 | 12 | 20 | 3 | 18 | 20 | 1 |
| HTMLTableRowElement.rowIndex | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.sectionRowIndex | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement.deleteRow | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement.insertRow | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement.rows | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| border-collapse | 1 | 12 | 1 | 1.1 | 18 | 4 | 1 |
| border-collapse.collapse | 1 | 79 | 1 | 1.1 | 18 | 4 | 1 |
| border-collapse.separate | 1 | 79 | 1 | 1.1 | 18 | 4 | 1 |
| border-spacing | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| caption-side | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| caption-side.bottom | 1 | 79 | 1 | 1 | 18 | 4 | 1 |
| caption-side.bottom-outside | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| caption-side.top | 1 | 79 | 1 | 1 | 18 | 4 | 1 |
| caption-side.top-outside | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| caption-side.writing-mode_relative_values | ✕ | ✕ | 42 | ✕ | ✕ | 42 | ✕ |
| empty-cells | 1 | 12 | 1 | 1.2 | 18 | 4 | 1 |
| empty-cells.hide | 1 | 12 | 1 | 1.2 | 18 | 4 | 1 |
| empty-cells.show | 1 | 12 | 1 | 1.2 | 18 | 4 | 1 |
| table-layout | 14 | 12 | 1 | 1 | 18 | 4 | 3 |
| table-layout.auto | 14 | 12 | 1 | 1 | 18 | 4 | 3 |
| table-layout.fixed | 14 | 12 | 1 | 1 | 18 | 4 | 3 |
| caption | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| col | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| col.span | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| colgroup | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| colgroup.span | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| table | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| tbody | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.colspan | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.headers | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.rowspan | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.rowspan.rowspan_zero | 65 | 79 | ≤55 | ✕ | 65 | ≤55 | ✕ |
| tfoot | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th.abbr | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th.colspan | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th.headers | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th.rowspan | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th.rowspan.rowspan_zero | ✕ | ✕ | ≤55 | ✕ | ✕ | ≤55 | ✕ |
| th.scope | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| thead | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| tr | 1 | 12 | 1 | 1 | 18 | 4 | 1 |