<CAPTION ...>
ALIGN : alignment of caption to table | |
VALIGN : if caption should be above or below table |
<CAPTION ...>
sets a caption for the table. <CAPTION ...>
goes just after the <TABLE ...>
tag. It does not go inside a
<TR ...>
, <TD ...>
or <TH ...>
element. There should be only one <CAPTION ...>
per table. For example, this code creates a table with a caption of "Favorite Foods":
<TABLE BORDER=2 CELLPADDING=3>
<CAPTION>Favorite Foods</CAPTION>
<TR> <TH>Person</TH> <TH>Food</TH> </TR>
<TR> <TD>Ping</TD> <TD>French Toast</TD> </TR>
<TR> <TD>Andy</TD> <TD>Squirrel</TD> </TR>
</TABLE>
which gives us this table:
Favorite Foods
Person | Food |
Ping | French Toast |
Andy | Squirrel |
<CAPTION ...>
is rarely used even though virtually every browser in use these days supports it.