coderef

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: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1+Supportedsince Nov 9, 2004
Current: 157
Safari
1+Supportedsince Jun 23, 2003
Current: 27
MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155
Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157
Safari iOS
1+Supportedsince Jun 29, 2007
Current: 27

How 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.

Show 55 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
HTMLTableElement.insertRow112141843
HTMLTableElement.rows112131841
HTMLTableElement.tBodies112131841
HTMLTableElement.tFoot112131841
HTMLTableElement.tHead112131841
HTMLTableRowElement112131841
HTMLTableRowElement.cells112131841
HTMLTableRowElement.deleteCell112131841
HTMLTableRowElement.insertCell112131841
HTMLTableRowElement.insertCell.index_parameter_negative_one11220318201
HTMLTableRowElement.insertCell.index_parameter_optional11220318201
HTMLTableRowElement.rowIndex112131841
HTMLTableRowElement.sectionRowIndex112131841
HTMLTableSectionElement112131841
HTMLTableSectionElement.deleteRow112131841
HTMLTableSectionElement.insertRow112131841
HTMLTableSectionElement.rows112131841
border-collapse11211.11841
border-collapse.collapse17911.11841
border-collapse.separate17911.11841
border-spacing112111841
caption-side112111841
caption-side.bottom179111841
caption-side.bottom-outside✕✕✕✕✕✕✕
caption-side.top179111841
caption-side.top-outside✕✕✕✕✕✕✕
caption-side.writing-mode_relative_values✕✕42✕✕42✕
empty-cells11211.21841
empty-cells.hide11211.21841
empty-cells.show11211.21841
table-layout1412111843
table-layout.auto1412111843
table-layout.fixed1412111843
caption1121≤4184≤3.2
col1121≤4184≤3.2
col.span1121≤4184≤3.2
colgroup1121≤4184≤3.2
colgroup.span1121≤4184≤3.2
table112111841
tbody112111841
td112111841
td.colspan112111841
td.headers112111841
td.rowspan112111841
td.rowspan.rowspan_zero6579≤55✕65≤55✕
tfoot112111841
th112111841
th.abbr112111841
th.colspan112111841
th.headers112111841
th.rowspan112111841
th.rowspan.rowspan_zero✕✕≤55✕✕≤55✕
th.scope112111841
thead112111841
tr112111841