This page demonstrates the use of tables. See Dynamic vs. Fixed for an article on setting up tables.
Tables are composed of rows and columns. The intersection of a row and column is called a cell.
| Features | |
![]() |
Anything can be put into a cell that can be put into the BODY of a HTML document - images, links, <HR>, or another table |
![]() |
The table and/or individual cells can be aligned |
![]() |
The size of borders, margins, and the color of cells and/or the table can be specified. |
|
<TABLE WIDTH=50% BORDER=5 BGCOLOR="fcac66"> <CAPTION ALIGN=BOTTOM> Example Table</CAPTION> <TR> <TD>Row 1, col 1</TD><TD>Row 1, col 2</TD> </TR> <TR> <TD>Row 2, col 1</TD><TD>Row 2, col 2</TD> </TR> </TABLE> |
| Row 1, col 1 | Row 1, col 2 |
| Row 2, col 1 | Row 2, col 2 |

| <TABLE> |
| ||||||||||||||||||
| <TR> |
| ||||||||||||||||||
| <TD>, <TH> |
| ||||||||||||||||||
| <CAPTION> |
|
| Important Note | |
![]() |
The order of precedence of attribute is that cells have precedence over row attributes and row attributes have precedence over table attributes. |
| This spans 2 rows | 1 Col wide | This spans 2 cols | |
| Row 2, col 2 | Row 2, col 3 | Row 2, col 4 | |
|
<TABLE WIDTH=50% BORDER > <TR> <TD ROWSPAN=2>This spans 2 rows</TD> <TD>1 Col wide</TD> <TD COLSPAN=2>This spans 2 cols</TD> </TR> <TR> <TD>Row 2, col 2</TD> <TD>Row 2, col 3</TD> <TD>Row 2, col 4</TD> </TR> </TABLE> |
|
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 > <TR><TD ><img src="media/ch_top.jpg"></TD></TR> <TR><TD ><img src="media/ch_bot.jpg"></TD></TR> </TABLE> |
View the result.