Table createTHead() method
Table object
Definition and Usage
The createTHead() method is used to get or create an element in a table.
Note: If a thead element already exists in the table, the createTHead() method returns the existing value and does not return a new element
**Note:** To remove the thead element from a table, use deleteTHead() method.
Syntax
tableObject.createTHead()
Browser support





All major browsers support the createTHead() method
Example
Example
Create and delete a thead element:
| cell 1 | cell 2 |
| cell 3 | cell 4 |
Try it »
Table object