createTHead

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

MDN Reference

. If no header exists in the table, this method creates it, and then returns it.