The td object represents a data cell in an HTML table.
For each <td> tag in an HTML table, a td object is created.
The th object represents a table header cell in an HTML table.
For each <th> tag in an HTML table, a th object is created.
Note: The TD/TH object can also use the properties/methods of:
W3C: W3C Standard.
| Property | Description | W3C |
|---|---|---|
| abbr | Sets or returns an abbreviated version of the content in a data cell | Yes |
| align | Deprecated. Sets or returns the horizontal alignment of the content in a data cell. Use style.textAlign instead | D |
| axis | Sets or returns a comma-separated list of related data cells | Yes |
| background | Deprecated. Sets or returns the background image of a data cell. Use style.background instead | D |
| bgColor | Deprecated. Sets or returns the background color of a table. Use style.backgroundColor instead | D |
| cellIndex | Returns the position of a cell in the cells collection of a table row | Yes |
| ch | Sets or returns an alignment character for a data cell | Yes |
| chOff | Sets or returns the horizontal offset of the ch property | Yes |
| colSpan | Sets or returns the number of columns a cell should span | Yes |
| headers | Sets or returns a list of header cell ids for the current data cell | Yes |
| height | Deprecated. Sets or returns the height of a data cell. Use style.height instead | D |
| noWrap | Deprecated. Sets or returns whether the content in a cell can be wrapped. Use style.whiteSpace instead | 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 data cell. Use style.width instead | D |
The TD/TH object also supports the standard properties and events.
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.