Easy Tutorial
❮ Jsref Obj Number Prop Element Tagname ❯

HTML DOM td/th Object


td Object

The td object represents a data cell in HTML.

Each <td> tag in an HTML table creates a td object.


th Object

The th object represents a header cell in HTML.

Each <th> tag in HTML creates a th object.


td/th Object Properties

W3C: W3C Standard.

Property Description W3C
abbr Sets or returns an abbreviated version of the content in the cell. Yes
align Deprecated. Sets or returns the horizontal alignment of the data within the cell. D
axis Sets or returns a comma-separated list of related cells. Yes
background Deprecated. Sets or returns the background image of the table. D
bgColor Deprecated. Sets or returns the background color of the table. D
cellIndex Returns the position of the cell in the cell collection of a row. Yes
ch Sets or returns the alignment character for the cell. Yes
chOff Sets or returns the offset of the alignment character for the cell. Yes
colSpan The number of columns the cell spans. Yes
headers Sets or returns the id value of the header-cell. Yes
height Deprecated. Sets or returns the height of the data cell. D
noWrap Deprecated. The nowrap attribute specifies that the content inside a cell should not wrap. D
rowSpan Sets or returns the number of rows the cell spans. Yes
vAlign Sets or returns the vertical alignment of the data within the cell. Yes
width Deprecated. Sets or returns the width of the cell. D

Standard Attributes and Events

The td/th object also supports standard attributes and events.

❮ Jsref Obj Number Prop Element Tagname ❯