This web page is going to introduce tables.

First row, first column First row, second column
Second row, first column Second row, second column

The problem is, this doesn't look much like a table because there aren't any borders around it.

Now lets take the same table and put the BORDER attribute in the TABLE designation to make it look more like a table.

First row, first column First row, second column
Second row, first column Second row, second column
Now lets say that we want this aligned in the center of the screen instead of against the left wall. This can be accomplished by using the DIV which is used to make a division in the formatting. Note that you must also close the division or the center alignment will continue past the table.

First row, first column First row, second column
Second row, first column Second row, second column

You now have a table that is in the center of the screen.

Now lets look at putting captions on the table and on the columns:

A caption on the whole table is done with the CAPTION command. Note that the caption can be either at the top or bottom of the table (ALIGN=BOTTOM puts the caption underneath the table). The TH command creates column headers.

This is the sample table complete with caption
COLUMN #1 COLUMN #2
First row, first column First row, second column
Second row, first column Second row, second column


This is the sample table complete with caption
ROW #S COLUMN #1 COLUMN #2
First row First row, first column First row, second column
Second row Second row, first column Second row, second column


Notice that things designated with the TH are in bold to stand out as row and column headers while things designated as TD are not bold - they are the data.

You can alter the BORDER on the table and you can use CELLPADDING to leave a little space inside, between the border and the data in the cell.

COLUMN #1 COLUMN #2
First row, first column First row, second column
Second row, first column Second row, second column


COLUMN #1 COLUMN #2
First row, first column First row, second column
Second row, first column Second row, second column

Notes on data alignment options

This is the sample table complete with caption
ROW #S COLUMN #1 COLUMN #2
First row 1,1 1,2
Second row 2,1 2,2
Third row 3,1 3,2