Introducton to Web Design Table Row Attributes
ATTRIBUTE DESCRIPTION
ALIGN Specifies the alignment of the text within the cells in the row. Valid values can be LEFT, RIGHT, or CENTER
BGCOLOR Specifies the background color for the table cells in the row. It works just the same as the corresponding attribute for the <BODY> tag
VALIGN Specifies the vertical alignment of text within the cells in the row. Valid values are TOP, BOTTOM, or CENTER.

Table Row Attributes by Example

Center aligned header Center aligned header
This row is right-aligned horizontally and bottom-aligned
vertically
The whole row is yellow
This row is centered horizontally and top-aligned
vertically
The whole row is orange

<TABLE BORDER = "1">
<TR ALIGN = "CENTER">
<TH>Center aligned header</TH>
<TH>Center aligned header</TH>
</TR>

<TR BGCOLOR = "YELLOW" VALIGN = "BOTTOM" ALIGN = "RIGHT">
<TD>This row is right-aligned
horizontally and bottom-aligned
<BR> vertically</TD>
<TD>The whole row is yellow</TD>
</TR>

<TR BGCOLOR = "ORANGE" VALIGN = "TOP" ALIGN = "CENTER">
<TD>This row is centered horizontally and
top-aligned
<BR>vertically</TD>
<TD>The whole row is orange</TD>
</TR>

</TABLE>

Previous Page | Next Page