Webmaster

HTML : Tables
Contents ]
Jérôme Versavel

Text Alignment

You can also use the following attributes to position your text precisely within a cell:

  • ALIGN, which aligns the text horizontally. It can take the following values:left, center and right.

  • VALIGN, which aligns the text vertically. The possible values are top, middle and bottom.

The following example produces a top right alignment:

<TABLE WIDTH="300" HEIGHT="200" BORDER="1">
<TR><TD ALIGN="right" VALIGN="top">
Top right aligned text
</TD></TR>
</TABLE>

Result:






  1   2   3   4   5   6