Web/API/HTMLTableElement/deleteTHead

From Get docs


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 StandardThe definition of 'HTMLTableElement: deleteTHead' in that specification. Living Standard

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
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