This page demonstrates the use of CSS style rules for tables.

Here's a table with lots of frills. Note that style rules for a cell may be inherited from the table as a whole, the tr or col that the cell falls in, or may be written specifically for the td itself. (Netscape doesn't seem to recognize the col style rules.)

Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6

Here's a table with no frills, and no spacing between the cells. Note the border-collapse characteristic, which isn't listed in your text, and takes the place of the cellspacing="0" attribute inside the table tag. The table background is red, and the cell backgrounds are green. There's no red space between the green cells, unlike the table above where a stripe of the gray table background intrudes between the aqua cells.

Cell 1 Cell 2
Cell 3 Cell 4

Here's an example of cell contents alignment using CSS:

A B C
D E F
G H H I