createCaption

The HTMLTableElement.createCaption() method returns the If no <caption> element exists on the table, this method creates it, and then returns it.

MDN Reference