HTML DOM td/thObject


td Object

The td object represents a data cell in HTML.

In an HTML table, each <td> tag creates a td object.


th Object

The th object represents the header cell in the HTML standard.

In HTML, each <th> tag creates a th object.


td/th Object Properties

W3C:W3C Standard.

Property Description W3C
abbr Sets or returns the abbreviated version of the content in a cell. Yes
align Deprecated.Sets or returns the horizontal alignment of data within a 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 a cell within the cell collection of a row. Yes
ch Sets or returns the alignment character of a cell. Yes
chOff Sets or returns the offset of the alignment character of a cell. Yes
colSpan The number of columns a cell spans. Yes
headers Sets or returns the id value of the header-cell. Yes
height Deprecated.Sets or returns the height of a data cell D
noWrap Deprecated.The nowrap attribute specifies that the content in a table cell does not wrap. D
rowSpan Sets or returns the number of rows a cell can span. Yes
vAlign Sets or returns the vertical alignment of data within a table cell. Yes
width Deprecated.Sets or returns the width of a cell. D

Standard Properties and Events

The td/th objects also support standardpropertiesandevents。

Other Extensions