Table stylingLimited availability
Attributes and properties of table elements, such as align, vAlign, noWrap, bgcolor, or char set various visual presentation properties of the table and its sections and cells.
Not yet supported in all major browsers — check the table and provide a fallback.
Discouraged: Some table styling attributes have no effect. They are superseded by CSS.
Browser support
DesktopChrome
✕Not supportedup to 155
Current: 155Edge
✕Not supportedup to 154
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
✕Not supportedup to 155
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Chrome, Edge, Firefox, Safari, Chrome Android, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: align.
Feature detection
JS · check before using
if ("align" in document.createElement("table")) {
// the align attribute/property of <table> is supported
}Sub-features
Support for each part of the feature (89). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLTableCaptionElement.align | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.align | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.axis | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.bgColor | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.ch | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.chOff | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.height | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.noWrap | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.vAlign | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableCellElement.width | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableColElement.align | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableColElement.ch | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableColElement.chOff | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableColElement.vAlign | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableColElement.width | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.align | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.bgColor | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.border | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.cellPadding | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.cellSpacing | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
Show 69 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLTableElement.frame | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.rules | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.summary | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableElement.width | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.align | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.bgColor | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.ch | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.chOff | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableRowElement.vAlign | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement.align | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement.ch | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement.chOff | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| HTMLTableSectionElement.vAlign | 1 | 12 | 1 | 3 | 18 | 4 | 1 |
| caption.align | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| col.align | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| col.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| col.charoff | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| col.valign | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| col.width | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| colgroup.align | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| colgroup.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| colgroup.charoff | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| colgroup.valign | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| colgroup.width | 1 | 12 | 1 | ≤4 | 18 | 4 | ≤3.2 |
| table.align | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.bgcolor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.border | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.cellpadding | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.cellspacing | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.frame | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.rules | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.summary | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| table.width | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| tbody.align | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| tbody.bgcolor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| tbody.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| tbody.charoff | ✕ | ✕ | 1 | ✕ | ✕ | 4 | ✕ |
| tbody.valign | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| td.abbr | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.align | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| td.axis | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.bgcolor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| td.charoff | ✕ | ✕ | 1 | ✕ | ✕ | 4 | ✕ |
| td.scope | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| td.valign | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| td.width | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| tfoot.align | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| tfoot.bgcolor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| tfoot.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| tfoot.charoff | ✕ | ✕ | 1 | ✕ | ✕ | 4 | ✕ |
| tfoot.valign | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| th.align | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| th.axis | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th.bgcolor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| th.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| th.charoff | ✕ | ✕ | 1 | ✕ | ✕ | 4 | ✕ |
| th.valign | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| th.width | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| thead.align | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| thead.bgcolor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| thead.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| thead.charoff | ✕ | ✕ | 1 | ✕ | ✕ | 4 | ✕ |
| thead.valign | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| tr.align | 1 | 12 | 1 | 3 | 18 | 4 | 2 |
| tr.bgcolor | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| tr.char | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| tr.charoff | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| tr.valign | 1 | 12 | 1 | 3 | 18 | 4 | 2 |