You are here: Reference > JavaScript > client-side > HTML DOM > properties > tHead (table)

tHead property (table)

Browser support:
Returns a reference to the thead element of the table.
The thead element is used to create a header for tables.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Returns the thead element that belongs to the table or null if it is not defined.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the tHead property:
    <script type="text/javascript">
        function GetTHead () {
            var tableHead = document.getElementById ("myTable").tHead;
            alert (tableHead.innerHTML);
    <button onclick="GetTHead ();">Get the innerHTML of the THead!</button>
    <table id="myTable" border="1px">
                <td>The contents of the THead element</td>
                <td>First row.</td>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content