HTML DOM TableHeader Object
TableHeader object
The TableHeader object is a new object in HTML5.
The TableHeader object represents the HTML <th> element.
Access TableHeader Object
You can access the <th> element by using getElementById():
var x = document.getElementById("myTh");
Create TableHeader Object
You can create a <th> element by using the document.createElement() method:
var x = document.createElement("TH");
TableHeader Object Properties
Properties | Description |
---|---|
abbr | Sets or returns the value of the abbr attribute. |
align |
Not supported in HTML5.Please use style.textAlign. Sets or returns the horizontal alignment of the content within the data cell. |
axis |
Not supported in HTML5. Sets or returns a comma-separated list of associated data cells. |
background |
Not supported in HTML5.Please use style.background. Sets or returns the background image of the data cell. |
bgColor |
Not supported in HTML5.Please use style.backgroundColor. Sets or returns the background color of the table. |
cellIndex | Returns the position of the cell in the cells collection of the table row. |
ch |
Not supported in HTML5. Sets or returns the alignment character of the data cell. |
chOff |
Not supported in HTML5. Sets or returns the horizontal offset of the ch attribute. |
colSpan | Sets or returns the value of the colspan attribute. |
headers | Sets or returns the value of the headers attribute. |
height |
Not supported in HTML5.Please use style.height. Sets or returns the height of the data cell. |
noWrap |
Not supported in HTML5.Please use style.whiteSpace. Sets or returns whether the content within the cell can wrap. |
rowSpan | Sets or returns the value of the rowspan attribute. |
vAlign |
Not supported in HTML5.Please use style.verticalAlign. Sets or returns the vertical alignment of the cell content. |
width |
Not supported in HTML5.Please use style.width. Sets or returns the width of the data cell. |
Standard properties and events
The TableHeader object supports standardsPropertiesAndEvents.