tag attributes
Attribute Value Usage
align "left"(default), "center", "right" Specifies the horizontal alignment of the cells.
bgcolor A valid color; the W3C recommends hexadeci-
mal colors
Specifies the color of the background.
valign "top", "middle"(default), "bottom" Specifies the vertical alignment of the cells.
Table A.20<td> and <th>tag attributes
Attribute Value Usage
align "left"(default), "center",
"right"
Specifies the horizontal alignment of the cell.
bgcolor A valid color; the W3C recommends
hexadecimal colors
Specifies the color of the background. (Deprecated)
colspan Numeric Specifies the number of columns spanned by a cell.
headers The id value(s) of a column or row
heading cell
Associates data cells with header cells. This attribute may be
accessed by assistive technologies such as screen readers.
height Number of pixels Specifies the height of the cell. (Deprecated)
nowrap "nowrap" Forces the browser to display all the text in the cell on one
line. (Deprecated)
rowspan Numeric Specifies the number of rows spanned by a cell.
scope "row", "col" Specifies the scope of the table cell contents (rowor
column). This attribute may be accessed by screen readers
but is not as well supported as the headersand idattri-
butes (see Chapter 8).
valign "top", "middle"(default),
"bottom"
Specifies the vertical alignment of the cell.
width Number of pixels or a percentage Specifies the width of the cell. (Deprecated)