Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM td / th object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM td/th object


td object

The td object represents a unit of data in HTML.

Each of the hashtags in the HTML table creates a td object.


th object

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

Each of the hashtags in HTML creates a th object.


td/th object properties

W3C: W3C standard.

Attributes describe W3C
abbr Set or return an abbreviation version of the content in the cell. Yes
align It has been discarded. Set or return to the horizontal arrangement of cell internal data. D
axis Set or return a comma-separated list of related cells. Yes
background It has been discarded. Set or return to the background image of the table. D
bgColor It has been discarded. Set or return to the table background color D
cellIndex Returns the location of the cell in a cell in a row. Yes
ch Set or return the align character of the cell. Yes
chOff Set or return the offset of the align character of the cell. Yes
colSpan The number of cells across cells. Yes
headers Set or return the ID value of Header-Cell. Yes
height It has been discarded. Set or return the height of the data unit D
noWrap It has been discarded. The NOWRAP property specifies that the content in the form cell is not wrapped. D
rowSpan Set or return the number of rows that can be across cells. Yes
vAlign Set or return a vertical arrangement of data in the table cell. Yes
width It has been discarded. Set or return the width of the cell. D

Standard properties and events

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