Table tHead Property - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Table


The tHead property returns a reference to the <thead> element of a table.

Return Value

A reference to the <thead> element of the table, or null if it is not defined

The following code shows how to Alert the innerHTML of <thead>:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
table, th, td {
    border: 1px solid black;
</style>/*  ww  w . ja v  a 2 s. c o  m*/

<table id="myTable">

<button onclick="myFunction()">Test</button>

function myFunction() {


Related Tutorials