Table Definition and usage
The <tr> tag defines the rows in the HTML table.
The TR element contains one or more th or TD elements.
The difference between HTML and XHTML
In HTML 4.01, the "bgcolor" of the TR element is not approved for use.
In the XHTML 1.0 Strict DTD, the "bgcolor" of the TR element is not supported.
Optional properties
Properties |
value |
Description |
Align |
- Right
- Left
- Center
- Justify
- Char
|
Defines the content alignment for a table row. |
BgColor |
- RGB (X,X,X)
- #xxxxxx
- ColorName
|
Do not approve of use. Please use the style instead. Specifies the background color of the table row. |
Char |
Character |
Specifies which character to align the text with. |
Charoff |
Number |
Specifies the first offset to the alignment. |
valign |
- Top
- Middle
- Bottom
- Baseline
|
Specifies the vertical alignment of content in a table row. |
Global Properties
The <tr> tag supports global properties in HTML.
Event Properties
The <tr> tag supports event properties in HTML.
<HTML><Body><P>Each table starts with the table label.</P><P>Each table row starts with the TR label.</P><P>Each table data is started by the TD label.</P><h4>A column:</h4><TableBorder= "1"><TR> <TD>100</TD></TR></Table><h4>Three columns in one row:</h4><TableBorder= "1"><TR> <TD>100</TD> <TD>200</TD> <TD>300</TD></TR></Table><h4>Two rows of three columns:</h4><TableBorder= "1"><TR> <TD>100</TD> <TD>200</TD> <TD>300</TD></TR><TR> <TD>400</TD> <TD>500</TD> <TD>600</TD></TR></Table></Body></HTML>
Fruit
html--table label, TR or TD