Make your own free website on Tripod.com

Tables are probably one of the most useful things that can be used on a website. However, they can be rather complicated to use sometimes.

A table can be used to make your website look exactly how you want it to. It can be used to align text, pictures, objects, or anything else you wish to put there.

Any table starts out with a table tag: < TABLE >. Inside the table tag, you can define a few things: BORDER, CELLSPACING, and CELLPADDING. The BORDER is exactly what it sounds like, a line that surrounds each cell and the table itself. By defining the BORDER you define how thick (in pixels) it is. The CELLSPACING is the space (in pixels) separating each cell. The CELLPADDING is the space in each cell (also in pixels) that is given between anything inside the cell, and the cell wall.

Here are some examples.

BORDER=5, CELLSPACING=0, CELLPADDING=30

1 2

BORDER=1, CELLSPACING=30, CELLPADDING=0

1 2

All of the above things are defined in the table tag.

In order to make a table work however you need more than that. You need to be able to make the table.

After you've created the table with the table tag, you need to start a table row: < TR >. This will create a horizontal row for the computer to recognize as part of the table. In order to make the individual cells however, you must create a table data cell < TD >. This will create a cell with which you can enter data. Once you have finished placing the data into the cell, you must end the table data < /TD >. You may continue making as many cells as you wish in this row, and once you're done you can end the row with an end row tag, and start a second row.

There is another command that can be defined in any tag that has something to do with a table, whether it be the < TABLE >, the < TR >, or the < TD >. This tag is the BGCOLOR tag. This tag can be used to color in behind the data. How many cells it colors depends on where you place it. If you place it in the TABLE tag, it will color every cell in the table that color (as a default it can be changed as you go). If you place it in the TR tag, it will color every cell in that row, and if you put it in the TD tag, it will only color that individual cell.

Back to home