YouTip LogoYouTip

Dom Obj Tabledata

HTML DOM td / th Object

HTML DOM td / th Object

-- Learning not just technology, but dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

HTML DOM Table Object

<th>

HTML DOM td/th Object


td Object

The td object represents a data cell in an HTML table.

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


th Object

The th object represents a header cell in an HTML table.

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


td/th Object Properties

W3C: W3C Standard.

Property Description W3C
abbr Sets or returns an abbreviated version of the content of a cell. Yes
align Deprecated. Sets or returns the horizontal alignment of the content 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 a cell. D
bgColor Deprecated. Sets or returns the background color of a cell. D
cellIndex Returns the position of a cell in the cells 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 Sets or returns the number of columns a cell should span. Yes
headers Sets or returns a list of header cell ids. Yes
height Deprecated. Sets or returns the height of a cell. D
noWrap Deprecated. The nowrap attribute specifies that the content in a cell should not wrap. D
rowSpan Sets or returns the number of rows a cell should span. Yes
vAlign Sets or returns the vertical alignment of the content within a cell. Yes
width Deprecated. Sets or returns the width of a cell. D

Standard Properties and Events

The td/th object also supports the standard properties and events.

HTML DOM Table Object

<th>

iFlytek Xingchen Coding Plan includes free model call quota, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform. Configuration Guide Β₯3.9/month Subscribe Now

Click to Share Notes

Cancel

← Dom Obj TablerowDom Obj Table β†’