1. Home
  2. Computing & Technology
  3. Web Design / HTML

<caption></caption>

By Jennifer Kyrnin, About.com

<caption> Description:

The caption tag describes the nature of the table.

<caption> Web Browser Support:

<caption> Attributes:

<caption> End Tag:

</caption> REQUIRED

<caption> Contents:

CDATA Usually text. The following tags are valid within the <caption> tag:
a, abbr, acronym, applet, b, basefont, bdo, big, br, button, cite, code, dfn, em, font, i, iframe, img, input, kbd, label, map, object, q, s, samp, script, select, small, span, strike, strong, sub, sup, textarea, tt, u, var

<caption> Valid Context:

The <caption> tag is valid within the following tag:
table

<caption> Usage:

  • table with caption
    <table border="1" cellpadding="5">
    <caption></caption>This is the caption</caption>
    <tr><td>table elements</td> <td>column #2</td></tr>
    </table>
  • table with caption on the bottom
    <table border="1" cellpadding="5">
    <caption align="bottom">This is the caption</caption>
    <tr><td>table elements</td> <td>column #2</td></tr>
    </table>

<caption> Special Notes:

  • This tag may be rendered differently in different browsers.

More <caption> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The caption Element - Describes the nature of the table - XHTML 1.0 HTML 4.0

©2008 About.com, a part of The New York Times Company.

All rights reserved.