Easy Tutorial
❮ Index Met Canvas Rect ❯

HTML DOM tr Object


tr Object

The tr object represents a row in an HTML table.

A tr object is created for each <tr> tag in the HTML document.


tr Object Collections

W3C: W3C Tag.

Collection Description W3C
cells Returns a collection of all <td> and <th> elements in the table row Yes

tr Object Properties

Property Description W3C
align Deprecated. Sets or returns the horizontal alignment of data in the row. D
bgColor Deprecated. Sets or returns the color of the table row. D
ch Sets or returns the alignment character for cells in the row. Yes
chOff Sets or returns the offset of the alignment character for cells in the row. Yes
height Deprecated. Sets or returns the height of the table row. Use style.height D
rowIndex Returns the position of the row in the table. Yes
sectionRowIndex Returns the position of the row within the tBody, tHead, or tFoot. Yes
vAlign Sets or returns the vertical alignment of data in the row. Yes

tr Object Methods

Method Description W3C
deleteCell() Deletes the specified cell from the row. Yes
insertCell() Inserts a blank <td> element at a specified position in the row. Yes

Standard Attributes and Events

The tr object also supports standard attributes and events.

❮ Index Met Canvas Rect ❯