The HTMLTableElement.deleteTHead()
removes the <thead>
element from a given <table>
.
Syntax
HTMLTableElement.deleteTHead();
Example
This example uses JavaScript to delete a table's header.
HTML
<table> <thead><th>Name</th><th>Occupation</th></thead> <tr><td>Bob</td><td>Plumber</td></tr> <tr><td>Jim</td><td>Roofer</td></tr> </table>
JavaScript
let table = document.querySelector('table'); table.deleteTHead();
Result
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'HTMLTableElement: deleteTHead' in that specification. |
Living Standard |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
deleteTHead | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android ? | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown