HTMLisEasy.com
HTML tutorials for the rest of us...

 Table Tutor - Quick Index 

A basic 2-row,
3-column table:

Roses are red
Violets are blue
<table border="2">
<tr>
  <td>Roses</td>
  <td>are</td>
  <td>red</td>
</tr>
<tr>
  <td>Violets</td>
  <td>are</td>
  <td>blue</td>
</tr>
</table>

Useful and optional table attributes:

(In addition to the attributes shown here, there are a few others. The ones here are limited to those that are commonly used, widely supported and mentioned in this tutorial. Consult the BareBones Guide packed with this tutorial for an expanded listing.)

<table
   cellpadding=0 or greater
   cellspacing=0 or greater
   border=0 or greater
   width=pixel or percent value
   height=pixel or percent value
   bgcolor="#123456"             (applies to whole table)
   background="myimage.gif"      (applies to whole table)
   rules="rows|cols|none|all">

<tr
   bgcolor="#123456">            (applies to whole row)
   align="left|center|right"     (applies to whole row)
   valign="top|middle|bottom">   (applies to whole row)

<td
   align="left|center|right"
   valign="top|middle|bottom"
   width=pixel or percent value
   bgcolor="#123456"
   colspan=1 or greater
   rowspan=1 or greater
   background="myimage.gif">


Remember, it's very good practice to ALWAYS include </td>, </tr> and </table> closing tags in your tables. If you don't, you run the risk of large chunks of your page not being rendered in some browsers. Consider yourself warned ;-)

Other items of interest mentioned in this tutorial:
  Do it with a Table!
   Picture frame examples
    The Dragon
     Background images in tables
      216 color chart
       1536 color chart
        Hey, there are sp aces in my ta ble!

Table Tutor
Lessons: Intro 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Tables Quick Reference
HTML 4.0 Reference      Barebones HTML Guide