createCaption

The HTMLTableElement.createCaption() method returns the element associated with a given

. If no
element exists on the table, this method creates it, and then returns it.

MDN Reference