In this section, we will learn that the deleteCaption() method is and how to use it in JavaScript.
What is deleteCaption() Method in JavaScript?
The JavaScript deleteCaption() method is used to delete the <caption> element of a table.
Note: you can use the createCaption() method to create a <caption> element for a table.
deleteCaption() Method Syntax:
tableElement.deleteCaption();
deleteCaption() Method Parameter
The method does not accept an argument.
deleteCaption() Method Return Value
The method does not return a value.
Example: using deleteCaption() Method in JavaScript
See the Pen using deleteCaption() Method in JavaScript by Omid Dehghan (@odchan1) on CodePen.