Using tables

The table tag was originally designed for actual tabular information, such as statistical charts. Here is an example:

Population by county
County Population Unemployment
Pike 3,549 3.2
Primrose 3,204 4.3
Pullman 3,204 4.1

You can alter certain attributes of the table. For example you can put a border around the cells of the table, and you can specify the cellspacing which is the horizontal spacing between cells. Both are shown in the example below.


Population by county
County Population Unemployment
Pike 3,549 3.2
Primrose 3,204 4.3
Pullman 3,204 4.1

In addition to "cellspacing," there is also "cellpadding," which works both horizontally and vertically, as seen below:


Population by county
County Population Unemployment
Pike 3,549 3.2
Primrose 3,204 4.3
Pullman 3,204 4.1


next page
outline