Dan's Work with Tables

Table Page 1


Table 1.0
Below is a simple table of four rows and three cells. Notice that the cells are as long as the longest line of text in a row. The table border is 5. Notice that when you specify a font in one cell, the font attirbutes do not apply beyond that cell. Background color can also be added to the individual table cells, as exampled in rows one and three.

Basic Table Elements

Table 1.0 - The Basic HTML Table
Colunm Heading A Column Heading B  
First Cell... Second Cell...  
Row Two Row Two Cell B  
Row Three Row Three Cell B Row Three Cell C
Row Four Row Four Cell B Row Four Cell C


Table 1.1
Below shows how a row can consist of one cell and span multiple columns.

Table 1.1 - Table with spanning cell
A 3-cell wide cell - <td colspan=3>
First Cell... Second Cell... Third Cell...


Table 2.0
This is a one cell table with a width of 2000. The border is zero and the background color is white. There is no "caption" (the caption below is regular test, flush left).

Table 2.0 - A Wide Table
This is a one-cell table, really wide. The background is white and the table border is zero.


Table 3.0
This is three nested tables within a table of four rows.

first nested table
Second nested table XXXXXXXXX
Third nested table
Forth TR (no nested table)


Table 4.0
Colored Border

Colored Border!
border=6, no cellspacing, no cellpadding

Another Border border=10
cellspacing=5
cellpadding=5

Look Here border=2
cellspacing=20
cellpadding=5


Help Links

Here are three excellent resources for tables:

  • Cedge's Table Cheats
  • Netscape
  • Hotwired Webmonkey



    Back to Top

    Index | Home | Page 1 | Page 2 | Page 3 | Page 4 | Page 5

    This page was last updated on March 11, 2003.