HTML Tables

As always, feel free to right click on this page to view the code.

Here's the Caption for "Aligning Text Within Cells"
Note that table headings
are automatically bolded.
Heading Here Heading Here Heading Here
Left Center Right
Top of the cell Middle of the cell Bottom of the cell

Here's the same table as above using "border=0" in the "table" tag:

Here's the Caption for "Aligning Text Within Cells"
Note that table headings
are automatically bolded.
Heading Here Heading Here Heading Here
Left Center Right
Top of the cell Middle of the cell Bottom of the cell

Here's a simple table with no border declared using different colored cells & fonts:

Looks like red font on yellow Looks like yellow font on lime
Looks like red font on royal blue Looks like yellow font on navy blue

Here's the same table as above declaring table width=40% (of the page width)

Looks like red font on yellow Looks like yellow font on lime
Looks like red font on royal blue Looks like yellow font on navy blue

Here's the same table where the color is declared for the entire table
in the table tag instead of the individual table data tags:
Looks like red font on green Looks like yellow font on green
Looks like red font on green Looks like yellow font on green

Here's the same table using "cellpadding" and "cellspacing" attributes
with an added border in the table tag for more elbow room:
Cellspacing is the amount of space between cells.
Cellpadding is the amount of space between a cell's contents and its border.
Looks like red font on green Looks like yellow font on green
Looks like red font on green Looks like yellow font on green

Here's a table spreading table data over several columns:

Some stuff More stuff Even more stuff
Longer stuff over 2 columns Ordinary stuff


Here's a table spreading table data over several rows:

Data worthy of 2 rows! The first row
The second row
This one doesn't The third row