HTML Codes

HTML Codes > Tables
previous page <COLGROUP WIDTH="..."> <CAPTION ALIGN="..."> next page

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

previous page <COLGROUP WIDTH="..."> <CAPTION ALIGN="..."> next page



Recommended: Link Popularity Software : WebPosition Gold : Google Cash : Arelis : Optilink : Search Engine Optimization Software : Search Engine Submission Software : Mike's Marketing Tools : Mike's Ecommerce Software : Search Engine Rankings : Link Popularity Checker : Cheap Domain Registration : Keywords