Easy Tutorial
❮ Met Document Getelementsbytagname Jsref Regexp Compile ❯

Table createTHead() Method


Definition and Usage

The createTHead() method is used to get or create a <thead> element in a table.

Note: If a <thead> element already exists in the table, the createTHead() method returns the existing element and does not create a new <thead> element.

Tip: To remove a <thead> element from a table, use the deleteTHead() method.

Syntax


Browser Support

All major browsers support the createTHead() method.


Example

Creating and deleting a <thead> element:


❮ Met Document Getelementsbytagname Jsref Regexp Compile ❯