This represents the caption for a table. <CAPTION>
elements should appear inside the <TABLE>
but not inside table rows or cells. The caption accepts an alignment attribute that defaults to ALIGN=top
but can be explicitly set to ALIGN=bottom
. Like table cells, any document body HTML can appear in a caption. Captions are, by default horizontally centred with respect to the table, and the may have their lines broken to fit within the width of the table.
The <CAPTION>
element can accept the following attributes:
ALIGN="top|bottom|left|center|right"
The ALIGN
attribute controls whether the caption appears above or below the table, using the top and bottom values, defaulting to top. The Internet Explorer allows the <CAPTION>
element to be left, right or center aligned. For the Internet Explorer to set the <CAPTION>
at the top or bottom of the table, it is necessary to use the VALIGN
attribute.
VALIGN="top|bottom"
The Internet Explorer allows use of the VALIGN
attribute inside the <CAPTION>
element. It specifies whether the caption text should be displayed at the top or bottom of the table.