Tables: HTML
Table Cell Attributes

Recall that the contents of each individual table cell appear between the <TD></TD> tag pair.

You can use attributes within the <TD></TD>tags to control the appearance of the data in each individual table cell.

  • You can align the contents of the cell on both the vertical and the horizontal axis.
  • You can change the color in an individual cell.
Align Table Data Use the ALIGN attribute to adjust the horizontal orientation of cell data.
<TD ALIGN="[direction]">Cell data</TD>
where [direction] is left, right, or center
Use the VALIGN attribute to adjust the vertical orientation of cell data.
<TD VALIGN="[direction]">Cell data</TD>
where [direction] is top, bottom, or middle
Color Table Cells Use the COLOR attribute with your choice of background color to change the color of an individual cell.
<TD COLOR="[rrggbb]">Cell data</TD>
where [rrggbb] is the hexadecimal equivalent of the red, green, blue palette

Tables: HTML
Overview
The Basic Table
Table Cell Attributes
Advanced Table Design

 

Personal Home PageWeb Design CenterTutorial MenuTop of Page

Web Design Center
Last Revised: October 19, 2006
© Agatha Taormina