W3 3.2y
4.0y
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y

<CAPTION>...</CAPTION>

Description

Specify the caption of a table. This element is only valid inside the TABLE element.

Inside a captions only plain text and text-level elements are allowed. Block level elements are not permitted.

DTD

<!ELEMENT CAPTION  - - (%inline;)*     -- table caption -->
<!ENTITY % CAlign "(top|bottom|left|right)">

<!ATTLIST CAPTION
  %attrs;                              -- %coreattrs, %i18n, %events --
  >
from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."

Attributes

Core attributes: class id style title
Internationalization attributes: dir lang
Events: onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup

W3 3.2y
4.0d
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y
ALIGN
Specify where the caption will displayed. Possible values are TOP, BOTTOM, LEFT and RIGHT. The default is TOP.
Only one caption is allowed in a table, and must be specified immediately after the opening TABLE element.

The values LEFT and RIGHT are not supported by Netscape Navigator.


W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0y
4.0y
TV 1.2n
2.1n
VALIGN
This attribute the vertical placement of the caption. Allowed values are TOP for a caption above the table or BOTTOM for a caption blow the table. Default is TOP.

Examples

Source
<TABLE border width="50%">
<CAPTION align="right" valign="bottom">Here's a caption for the table</CAPTION>
<TR><TH>Header 1</TH><TH>Header 2</TH><TH>Header 3</TH></TR>
<TR><TD>Value 1</TD><TD>Value 2</TD><TD>Value 3</TD></TR>
<TR><TD>Value 4</TD><TD>Value 5</TD><TD>Value 6</TD></TR>
</TABLE>
 
Result
Here's a caption for the table
Header 1Header 2Header 3
Value 1Value 2Value 3
Value 4Value 5Value 6
Statistics