tr

FilterElements

<tr> ... </tr>

Defines a row of cells within a table. A tr element may contain only some number of td and/or th elements. It may be used only within a table, thead, tfoot, or tbody element. Settings made in the tr element apply to all the cells in that row, however, the documented attributes below should be avoided in favor of style sheet controls.

Start/End Tags

HTML: Required/Optional;
XHTML: Required/Required

Specifications

  • HTML 4.01
  • HTML5

align=

Values: left | right | center | justify | char
Not in HTML5. Specifies the horizontal alignment of text in a cell or cells. The default value is left.

bgcolor=

Values: #rrggbb or color name
Deprecated. Not in HTML5. Specifies a background color to be used in the row. A row’s background color overrides the color specified at the table level.

char=

Values: character
Not in HTML5. Specifies a character along which the cell contents will be aligned when align is set to char. The default character is a decimal point (language-appropriate). This attribute is generally not supported.

charoff=

Values: length
Not in HTML5. Specifies the offset distance to the first alignment character on each line. If a line doesn’t use an alignment character, it should be horizontally shifted to end at the alignment position. This attribute is generally not supported by current browsers.

valign=

Values: top | middle | bottom | baseline
Not in HTML5.Specifies the vertical alignment of text in the cells of a column.
<table>
<tr>
  <td>cell 1</td><td>cell 2</td>
</tr>
<tr>
  <td>cell 3</td><td>cell 4</td>
</tr>
</table>

Rendered Example

     
cell 1cell 2
cell 3cell 4

tr is a container element for some number of td elements.