martin2k

The CAPTION Tag

HomeForumTutorials Tags:
 
 

Name

Caption

Description

Creates a caption above a table (by default) - it must be used within the TABLE tag.  The HTML specification states that only one CAPTION tag is meant to be used in each TABLE tag, however Internet Explorer supports more than one.  Firefox only supports the first one.

Attributes

ALIGN

By default the caption is centred above the table.  The following values are valid: left, right, top, bottom.

Related Tags

The CAPTION tag is used within the TABLE tag.

Example

Code

<table border="1" cellpadding="1" cellspacing="2">
<caption>This is the table's caption</caption>
<tr>
<td>Cell contents</td>
<td>Cell contents</td>
</tr>
<tr>
<td>Cell contents</td>
<td>Cell contents</td>
</tr>
</table>

Generates

This is the table's caption
Cell contents Cell contents
Cell contents Cell contents

Please fill in the below form if you have any comments or additional information you want to add about the above information.  If you have any questions, please visit the ForumAny questions sent using this form will be ignored.

* - Mandatory

*Name: E-mail:

*Comments:

*Please type the following code (your comment cannot be accepted without it):


© Martin Allen 1999 - 2006.  Last updated Sunday 01 October 2006 06:46:47 PM +0100.