Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The deleteCell() method of the HTMLTableRowElement interface removes a specific row cell from a given <tr>.
The cell index of the cell to remove. If index is -1 or equal to the number of cells, the last cell of the row is removed.
None (undefined).
Thrown if index is greater than the number of cells or if it is smaller than -1.
This example uses HTMLTableRowElement.insertCell() to append a new cell to a row.
| HTML # dom-tr-deletecell |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 6, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.