GeoCitesSites.com

Table Tags


Tables
Table is a tag that starts a grid that can contain any other HTML tag. The grid line size can be altered from invisible to thick.
There are too many table attributes and options to include here. I recommend getting a book to understand them all.

table attributes include:
  • align
  • bgcolor
  • border
  • bordercolor
  • cellpadding
  • cellspacing
  • class
  • cols
  • dir
  • frame
  • height
  • id
  • lang
  • rules
  • style
  • summary
  • title
  • width
The table also needs tags (options) to define where to put the cells. These options have most of the same attributes as table.
  • <tr> table row
  • <td> table data
  • <th> table header
  • <caption> explains what the table is.
Table Example:
<table border=2 cellpadding=5 cellspacing=2 bgcolor="lightyellow">
<caption align=bottom> Bottom aligned caption </caption>
<tr> <th colspan=2 align=center>Table Header</th></tr>
<tr bgcolor="lightblue"<>td colspan=2 rowspan=1 > table data 2 colums</td></tr>
<tr> <td> row1text1 </td> row1text2 </td> </tr >
<tr><td> row2text3 </td><td> row2text4 </td></tr>
</table>

will give you the following:

Bottom aligned caption
Table Header
table data 2 colums
row1 text1 row1 text2
row2 text3 row2 text4