HTML tr tag
HTML Tag Reference
Example
CompletedA simple HTML table, containing two columns and two rows:
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
Try it Yourself
More "Try it Yourself" examples below.
Definition and Usage
CompletedBrowser Support
Completed| Element | |||||
|---|---|---|---|---|---|
| <table> | Yes | Yes | Yes | Yes | Yes |
Differences Between HTML 4.01 and HTML5
CompletedAll the layout attributes are removed in HTML5.
Attributes
Completed| Attribute | Value | Description |
|---|---|---|
| align | right left center justify char |
Not supported in HTML5. Aligns the content in a table row |
| bgcolor | rgb(x,x,x) #xxxxxx colorname |
Not supported in HTML5. Specifies a background color for a table row |
| char | character | Not supported in HTML5. Aligns the content in a table row to a character |
| charoff | number | Not supported in HTML5. Sets the number of characters the content will be aligned from the character specified by the char attribute |
| valign | top middle bottom baseline |
Not supported in HTML5. Vertical aligns the content in a table row |
Global Attributes
CompletedThe <tr> tag also supports the Global Attributes in HTML.
Event Attributes
CompletedThe <tr> tag also supports the Event Attributes in HTML.
Default CSS Settings
CompletedMost browsers will display the element with the following default values:
Example
tr {
display: table-row;
vertical-align: inherit;
border-color: inherit;
}
