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

HTML DOM td/th headers property

td/th headers property

td/th Object Reference td/th object


Definition and Usage

The headers property sets or returns the list of header cells that contain header information for the current data cell.

The value of this property is a quoted list of names, which are the names of the different header cells defined by the id property.

Syntax

Set the headers property:

tdObject.headers="

header_ids

"

or

thObject.headers="

header_ids

"

Return the headers property:

tdObject.headers

or

thObject.headers

Tip: The headers property has no default value.

Value Description
header_ids Defines a list of header cell ids separated by spaces.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the headers property


Example

Example

Display the second row header:

Runoob Tutorial(runoob.com)

    

        

        

        

        

    

    

        

        

        

        

    

Name Email Phone Address
John Doe someone@example.com +45342323 Rosevn 56,4300 Sandnes,Norway

Try it »


td/th Object Reference td/th object