HTML and CSS Reference
In-Depth Information
align
This attribute is used to align the contents of the cells within a
<th>
tag. Common
values are
center
,
justify
,
left
, and
right
.
axis
This attribute is used to provide a name for a group of related headers.
background
This nonstandard attribute, which is supported by most browsers, specifies the
URL of a background image for the table cell. The image is tiled if it is smaller than the cell's
dimensions.
bgcolor
This attribute specifies a background color for a table cell. Its value can be either a
named color, such as
red
, or a color specified in the hexadecimal
#RRGGBB
format, such as
#FF0000
.
bordercolor
This attribute, supported by Internet Explorer and Netscape, is used to set the
border color for a table cell. The attribute should be used only with a positive value for the
border
attribute. The value of the attribute can be either a named color, such as
green
, or a
color specified in the hexadecimal
#RRGGBB
format, such as
#00FF00
.
bordercolordark
This Internet Explorer-specific attribute specifies the darker of two border
colors used to create a three-dimensional effect for a cell's borders. It must be used with the
border
attribute set to a positive value. The attribute value can be either a named color,
such as
blue
, or a color specified in the hexadecimal
#RRGGBB
format, such as
#0000FF
.
bordercolorlight
This Internet Explorer-specific attribute specifies the lighter of two border
colors used to create a three-dimensional effect for a cell's borders. It must be used with the
border
attribute set to a positive value. The attribute value can be either a named color,
such as
red
, or a color specified in the hexadecimal
#RRGGBB
format, such as
#FF0000
.
char
This attribute is used to define the character to which element contents are aligned
when the
align
attribute is set to the
char
value.
charoff
This attribute contains an offset, specified as a positive or negative integer, for
aligning characters as related to the
char
value. A value of
2
, for example, would align
characters in a cell two characters to the right of the character defined by the
char
attribute.
colspan
This attribute takes a numeric value that indicates how many columns wide a cell
should be. This is useful for creating tables with cells of different widths.
headers
This attribute takes a space-separated list of
id
values that correspond to the
header cells related to this cell.
height
This attribute indicates the height of the cell, in pixels or as a percentage. Some
browsers may have rendering problems with percentage values.
nowrap
This attribute keeps the content within a table cell from automatically wrapping.
The
nowrap
attribute takes no value under HTML but should be set to the value
nowrap
under XHTML.
rowspan
This attribute takes a numeric value that indicates how many rows high a table
cell should span. This attribute is useful in defining tables with cells of different heights.