HTML DOM tr Object
tr object
The tr object represents a row in an HTML table.
Each tag that appears in an HTML document creates a tr object.
tr Object Collections
W3C: The W3C tag.
| Union | Description | W3C | ||
|---|---|---|---|---|
| cells | Returns all in a table row. | and | elements of the image map collection | 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 of cells in the row. | Yes |
| chOff | Sets or returns the offset of the alignment character of cells in the row. | Yes |
| height | Deprecated. Sets or returns the height of the table row. Use style.height Replacing | D |
| rowIndex | Returns the position of the row in the table. | Yes |
| sectionRowIndex | Returns the position of the row in 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 in the row. | Yes |
| insertCell() | Inserts an empty element at the specified position in a row. | Yes |