createCaption

The createCaption() method of the HTMLTableElement interface creates a element, inserts it as the first child of the given

, and returns it. If the table already has a
element child, this method returns the first such child without creating one.

MDN Reference