createTHead

The createTHead() method of HTMLTableElement objects returns the thead element associated with a given table.

MDN Reference