The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's HTML Tag Reference

| Index | Previous Tag: <BUTTON> | Next Tag: <CENTER> |


<CAPTION>

Defines a caption for a table.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.0 and later 2.0 and later 1.1 and later
Notes:
  • This tag requires the </CAPTION> end tag.
Attributes:
ALIGN = "Text"
The placement of the caption text relative to the table.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.0 and later 2.0 and later 1.1 and later

Notes:

  • Two values are supported in all browsers:
    • TOP: Places the caption at the top of the table.
    • BOTTOM: Places the caption at the bottom of the table.
  • Internet Explorer also enables you to align the caption text horizontally by using any of these values: LEFT, CENTER, or RIGHT. If you use one of these, then you must use VALIGN to postiion the caption..
  • This attribute is deprecated.

CLASS = "Text"
The style sheet class used by the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • You can specify two or more classes; be sure to separate each class name with a space.

ID = "Text"
An alphanumeric string that uniquely identifies the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • Although you can use letters and numbers for the ID, the first character must be a letter.

LANG = "Text"
The language used by the tag's attribute values and text content.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

STYLE = "Text"
The style or styles to use with the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • If you enter multiple style properties, separate each one with a semi-colon (;).

VALIGN = "Text"
The placement of the caption text relative to the table.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 2.0 and later Not supported

Notes:

  • This attribute is Internet Explorer-only.

Example:
<TABLE BORDER>
<CAPTION ALIGN=TOP>Table 1.4. The price of tea in China</CAPTION>
<TR>
<TD>
The rest of the table's rows and columns go here.
</TD>
</TR>
</TABLE>
How It Looks:
Table 1.4. The price of tea in China
The rest of the table's rows and columns go here.

| Index | Previous Tag: <BUTTON> | Next Tag: <CENTER> |