|
|
HTML <tr> tag
Syntax
<tr> - </tr>
Definition and Usage
The TR element defines a row in a table.
Optional Attributes
| Attribute |
Value |
Description |
| align |
right
left
center
justify
char |
Defines the text alignment in cells |
| bgcolor |
rgb(x,x,x)
#xxxxxx
colorname |
Specifies the background color of the table cell. Deprecated.
Use style sheets. |
| char |
character |
Specifies which character to align text on.
Note: Only used if align="char"
|
| charoff |
pixels
% |
Specifies the alignment offset to the first character to
align on.
Note: Only used if align="char"
|
| valign |
top
middle
bottom
baseline |
Specifies the vertical text alignment in cells |
Standard Attributes
| id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard
Attributes.
Event Attributes
| onclick, ondblclick, onmousedown, onmouseup, onmouseover,
onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
Example
| Source |
Output |
<table border = "4">
<tr>
<td>Cell 1</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 2</td>
<td>Cell 4</td>
</tr>
</table> |
| Cell 1 |
Cell 3 |
| Cell 2 |
Cell 4 |
|
|
|