Learning HTML: 6 of 6

Tables


Use the following code to create a 3 column table with three rows:
<table border=8>
<td>Column 1, Row 1
<td>Column 2, Row 1
<td>Column 3, Row 1
<tr>
<td>Column 1, Row 2
<td>Column 2, Row 2
<td>Column 3, Row 2
<tr>
<td>Column 1, Row 3
<td>Column 2, Row 3
<td>Column 3, Row 3
</table>

Tables can be created with any number of columns and rows, but you need to be aware of the width of the screen as a limiting factor for the number of columns.

Columns


The code for creating columns is similar to creating a table, the difference is that you make the border between the columns invisible. Use the following code to create two columns:
<table border=0 cellpadding=10>
<tr>
<td align=left valign=top>
Everything that appears now will go into the left hand column until
</td>
<td align=left valign=top>
Everything that appears now will go into the right hand column until
</tr>
</table>

Additional HTML Resources:

Design Tips 1 and 2. Or return to Learn HTML: Part 1