Table Examples

Table 1

border=1 cellspacing=1 cellpadding=1

one two three
four five six
seven eight nine

 

Table 2

border=10 cellspacing=1 cellpadding=1

one two three
four five six
seven eight nine

 

Table 3

border=1 cellspacing=10 cellpadding=1

one two three
four five six
seven eight nine

 

Table 4

border=1 cellspacing=1 cellpadding=10

one two three
four five six
seven eight nine

 

Table 5

border=1 cellspacing=5 cellpadding=5

one two three
four five six
seven eight nine

 

Table 6

border=0 cellspacing=5 cellpadding=5

one two three
four five six
seven eight nine

 

Table 7

border=1 cellspacing=5 cellpadding=5 bgcolors

one two three
four five six (more text widens columns)
seven eight nine

 

Table 8

border=1 cellspacing=5 cellpadding=5 width=300
Note how the empty cell is displayed.

width=100 width=100 width=100
four five six
seven eight

 

Table 9

border=1 cellspacing=5 cellpadding=5 width=300 col & row spans

colspan=2 three
four five rowspan=2
seven eight

 

Table 10

border=1 cellspacing=5 cellpadding=5 width=300 height=200

Center Aligned
vertical alignment (valign) set to top vertical alignment set to middle (default) vertical alignment set to bottom

 

Table 11

border=1 cellspacing=5 cellpadding=5 table headings (th)

one two three
four five six
seven eight nine

 

Table 12

border=0 cellspacing=0 cellpadding=0 width=330
3-cell borderless table used for layout to arrange smaller tables

one
two
three
one
two
three
one
two
three

 

Table 13

Using Tables for Layout
Using borderless tables is a common trick for arranging text, graphics, and other tables on a page in a specific layout
Picture of the rotating Earth globe
one
two
three
one
two
three