HTML DOM tr Object

## JavaScript Reference

Overview

## JavaScript Objects

JS Array JS Boolean JS Date JS Math JS Number JS String JS RegExp JS Global

## Browser Objects

Window Navigator Screen History Location

## HTML DOM Objects

DOM Document DOM Elements DOM Attributes DOM Events

## HTML Objects

DOM Anchor DOM Area DOM Base DOM Body DOM Button DOM Form DOM Frame/IFrame DOM Frameset DOM Image DOM Input Button DOM Input Checkbox DOM Input File DOM Input Hidden DOM Input Password DOM Input Radio DOM Input Reset DOM Input Submit DOM Input Text DOM Link DOM Meta DOM Object DOM Option DOM Select DOM Style DOM Table DOM td / th DOM tr DOM Textarea

# HTML DOM tr Object

« Previous
Next Reference »

## tr Object

The tr object represents an HTML table row.

For each <tr> tag in an HTML document, a tr object is created.

## tr Object Collections

W3C: W3C Standard.

Collection | Description | W3C
--- | --- | ---
cells | Returns a collection of all <td> or <th> elements in a table row | Yes

## tr Object Properties

Property | Description | W3C
--- | --- | ---
align | Deprecated. Sets or returns the horizontal alignment of the content within a table row. Use style.textAlign instead | D
bgColor | Deprecated. Sets or returns the background color of a table row. Use style.backgroundColor instead | D
ch | Sets or returns an alignment character for cells in a table row | Yes
chOff | Sets or returns the horizontal offset of the ch property | Yes
height | Deprecated. Sets or returns the height of a table row. Use style.height instead | D
rowIndex | Returns the position of a row in the rows collection of a table | Yes
sectionRowIndex | Returns the position of a row in the rows collection of a tbody, thead, or tfoot | Yes
vAlign | Sets or returns the vertical alignment of the content within a table row | Yes

## tr Object Methods

Method | Description | W3C
--- | --- | ---
deleteCell() | Deletes a cell from the current table row | Yes
insertCell() | Inserts a cell into the current table row | Yes

## Standard Properties and Events

The TR object also supports the standard properties and events.

« Previous
Next Reference »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE