Tables
Tables have many uses in a web page. You may use them always or never, it depends on what you like. Most likely you will find some use for a table.
An example of a table:
Heading 1 | Heading 2 |
Data cell 1 | Data cell 2 |
Spanning 2 columns |
Data cell 4 | Spanning 2 rows |
Data cell 5 |
Here's the code for this table:
<table border=1> Declares the beginning of the table and the border to be size 1.
<tr> Declares the beginning of a new table row
<th>Heading 1</th> <th> Heading 2 </th> The th declares a table header, written always in boldface.
</tr> Declares the end of the table row
<tr>
<td> Data cell 1 </td> <td> Data cell 2 </td> 2 regular table data cells
</tr>
<tr>
<td colspan=2> Spanning 2 columns </td> The colspan=2 tells it to span 2 columns.
</tr>
<tr>
<td> Data cell 4 </td> <td rowspan=2> Spanning 2 rows </td> The rowspan=2 to span 2 rows
</tr>
<tr>
<td> Data cell 5 </td>
</tr>
</table> Required to end the table.
This is the most basic form of a table. If you want no border, set it to 0. Tables can be used creatively to create a layout like this. This
layout was created with a table along the left side with the images, and another for the main body. Each block of text is contained in seperate <td> cells.
Back to Links and Images                                
© 1997 Donnie Thompson
http://www.oocities.org/TimesSquare/Arcade/2121/html4.htm