<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.





About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.