Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML tag

HTML tag

Example

A table with a caption:

<

table

border

=

"

1

"

<

caption

Monthly savings

caption

<

tr

<

th

Month

th

<

th

Savings

th

tr

<

tr

<

td

January

td

<

td

$100

td

tr

table

Try it »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the tag.


Tag Definition and Usage Notes

The tag defines the caption of a table. The tag must be placed directly

You can define only one caption for each table.

**Tip:** Usually this caption is centered above the table. However, the CSS properties "text-align" and "caption-side" can be used to set the alignment and display position of the caption.


Differences between HTML 4.01 and HTML5

HTML5 does not support the align attribute.

HTML 4.01 Deprecated. the align attribute.


property

after the tag.
property Value Description
align left
 right       

 top       

 bottom | HTML5 does not support。HTML 4.01 已废弃。 定义标题的对齐方式。 |


Global Attributes

The tag supports [HTML Global Attributes](/tags/ref-standardattributes.html).

Event attribute

The tag supports [HTML Event Attributes](/tags/ref-eventattributes.html).