Make your own free website on Tripod.com
The HTML Help Home Page

Sign My Guestbook

Get your own FREE Guestbook from htmlGEAR

View My Guestbook

Lessons

Other Links

Tables -- The Basics

This is is section 1 of the Tables leson. It will cover all you'll need to know about making tables.


A Look at a Table

The format of a table has this code:

The stuff inside the table.

And the table would look like this.

The stuff inside the table.

Notice that the "table" doesn't look like a table. A regular table would have rows and columns, and particularly a border. Let's make a border now by adding the BORDER attribute to the TABLE tag.

Example:
The stuff inside the table.
Source:





The stuff inside the table.

The table now looks more like a table. Now it's time to add some columns and rows.


Table Rows and Columns

To make rows, use the TR tag. TR stands for table row. The example below is a table with five rows. Notice there are TD tags between the table rows. We'll explain those later. Also, make sure to place the TR and TD tags within the TABLE tags. They won't work anywhere else.

Example:
Row 1
Row 2
Row 3
Row 4
Row 5
Source:

Row 1
Row 2
Row 3
Row 4
Row 5

Now we'll add some columns. This example makes a table with 5 rows and 2 cells in each row. Note that you should put an equal number of TD tags for each row.

Example:
1
3
5
7
9
Source:

Row 1
Row 2
Row 3
Row 4
Row 5

That's all the basics for tables in this lesson. Remember that you can put in any HTML you want, including tables, within a table cell.