Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Table createTHead() method

Table createTHead() method

Table Object Reference 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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the createTHead() method


Example

Example

Create and delete a thead element:

Runoob Tutorial(runoob.com)

    

        

        

    

    

        

        

    

cell 1 cell 2
cell 3 cell 4

Try it »


Table Object Reference Table object