learning how to use tables
In the beginning was the table. For a long time the table was the building block of web pages. Every webmaster used them to layout and build their website. That has all changed. The use of tables in design and layout has been replaced with CSS, which we will jump into later.Although the table is no longer used in design, it still has many other applications. In this example I will show you how to build a basic four column table.
Table syntax
<table align="left" width="100%" cellspacing="0" cellpadding="3" border="1"><caption> Example Table </caption>
<thead> <tr>
<th align="left" width="25%">First name</th>
<th align="left" width="25%">Last name</th>
<th align="left" width="25%">Address</th>
<th align="left" width="25%">State</th>
</tr> </thead>
<tbody>
<tr><td>Ralph</td><td>Crabknocker</td><td>213 Wisteria lane</td><td>Georgia</td></tr>
<tr><td>George</td><td>Bush</td><td>1600 Pennsylvania Ave.</td><td>Washington, DC</td></tr>
</tbody>
<tfoot><tr><td; colspan="4">page last updated</td></tr></tfoot></table>
You can add as many <tr> (table rows) as you like to this table but the <td> (table data columns) is limlted to 4. The <th> is the (table header) for each table data cell.
| First name | Last name | Address | State |
|---|---|---|---|
| Ralph | Crabknocker | 213 Wisteria lane | Georgia |
| George | Bush | 1600 Pennsylvania Ave. | Washington, DC |
Practice with this table. You can use this table syntax to build any table. Remember, You can use an attached CSS file or in-line style to change colors and styles to your table.
| First name | Last name | Address | State |
|---|---|---|---|
| Ralph | Crabknocker | 213 Wisteria lane | Georgia |
| George | Bush | 1600 Pennsylvania Ave. | Washington, DC |

![[advertisement]quality hosting plans](images/banners/hosting.jpg)
