The HTMLTableElement.deleteCaption() method removes the <caption> element from a given <table>. If there is no <caption> element associated with the table, this method does nothing.
deleteCaption()None.
None (undefined).
This example uses JavaScript to delete a table's caption.
<table>
<caption>
This caption will be deleted!
</caption>
<tbody>
<tr>
<td>Cell 1.1</td>
<td>Cell 1.2</td>
</tr>
<tr>
<td>Cell 2.1</td>
<td>Cell 2.2</td>
</tr>
</tbody>
</table>let table = document.querySelector("table");
table.deleteCaption();