<caption> tag in HTML

The <caption> tag is a block element used to add a caption to a title.

Important Description

  • The <caption> tag must be inserted immediately after the <table> tag.
  • A table caption will be center-aligned above a table by default.
  • The CSS properties text-align & caption-side can be used to align and place the caption.
  • Open and close tag required of <caption>.

Example of <caption> Tag

Result Look Like

Monthly Working Days
Month Working Days
January 20 Days
February 19 Days

<caption> Tag Browser Support

Element Chrome Edge Firefox Safari Opera
<caption> Yes Yes Yes Yes Yes

Global Attributes

Event Attributes

Attributes

Align attributes is not supported in HTML5

Attribute Value Description
align left
right
top
bottom
Defines the alignment of the caption

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)