td/th headers property
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





All major browsers support the headers property
Example
Example
Display the second row header:
| Name | Phone | Address | |
|---|---|---|---|
| John Doe | someone@example.com | +45342323 | Rosevn 56,4300 Sandnes,Norway |
Try it »
td/th object