Back Main GuestBook Contact Music (JS) Appendix

<CAPTION></CAPTION> - Table Caption

This tag creates a caption for the table. It must be put right after the opening <TABLE> tag regardless of where it will appear on the screen.

You must put </CAPTION> at the end of the caption.

HTML 4.0 Specification § 11.2.2

Attributes for <TABLE>

  %coreattrs %i18n %events

Presentational Attributes

D align= [CI]
  • top
Specifies a caption at the top of the table. This is the default value.
  • bottom
Specifies a caption at the bottom of the table.
  • left
Specifies a caption to the left of the table.
  • right
Specifies a caption a caption to the right of the table.
This attribute specifies where the table's caption will be placed.

Samples:

Table A

Caption with default (top) alignment
Cell A Cell B Cell C Cell D
Cell E Cell F Cell G Cell H

Table B

Caption with bottom alignment
Cell A Cell B Cell C Cell D
Cell E Cell F Cell G Cell H

Table C

Caption with left alignment
Cell A Cell B Cell C Cell D
Cell E Cell F Cell G Cell H

Table D

Caption with right alignment
Cell A Cell B Cell C Cell D
Cell E Cell F Cell G Cell H

Here is the code for the sample above:

<H4>Table A</H4>

<TABLE cellpadding=10 border=1>
<CAPTION>Caption with default (top) alignment</CAPTION>
<TR>
    <TD>Cell A</TD>
    <TD>Cell B</TD>
    <TD>Cell C</TD>
    <TD>Cell D</TD>
</TR>
<TR>
    <TD>Cell E</TD>
    <TD>Cell F</TD>
    <TD>Cell G</TD>
    <TD>Cell H</TD>
</TR>
</TABLE>

<H4>Table B</H4>

<TABLE cellpadding=10 border=1>
<CAPTION align=bottom>Caption with bottom alignment</CAPTION>
<TR>
    <TD>Cell A</TD>
    <TD>Cell B</TD>
    <TD>Cell C</TD>
    <TD>Cell D</TD>
</TR>
<TR>
    <TD>Cell E</TD>
    <TD>Cell F</TD>
    <TD>Cell G</TD>
    <TD>Cell H</TD>
</TR>
</TABLE>

<H4>Table C</H4>

<TABLE cellpadding=10 border=1>
<CAPTION align=left>Caption with left alignment</CAPTION>
<TR>
    <TD>Cell A</TD>
    <TD>Cell B</TD>
    <TD>Cell C</TD>
    <TD>Cell D</TD>
</TR>
<TR>
    <TD>Cell E</TD>
    <TD>Cell F</TD>
    <TD>Cell G</TD>
    <TD>Cell H</TD>
</TR>
</TABLE>

<H4>Table D</H4>

<TABLE cellpadding=10 border=1>
<CAPTION align=right>Caption with right alignment</CAPTION>
<TR>
    <TD>Cell A</TD>
    <TD>Cell B</TD>
    <TD>Cell C</TD>
    <TD>Cell D</TD>
</TR>
<TR>
    <TD>Cell E</TD>
    <TD>Cell F</TD>
    <TD>Cell G</TD>
    <TD>Cell H</TD>
</TR>
</TABLE>