Note/Info The <figcaption> tag is a new tag in HTML5.
HTML5 <figcaption> tag
The <figcaption> tag sets a caption for the <figure> element.
Either you can place this tag as the first or the last child of the <figure> element but we recommend to code this as the last child.
Syntax:
<figcaption>text….</figcaption>
Example
<figure> <img src="img/mysore_palace.jpg" alt="Mysore Palace" width="350px" height="400px"> <figcaption>Figure.1 – Mysore Palace , Mysore Karnataka. </figcaption> </figure>
CSS Default value
display: block;
How Browser will display
BLOCK Level.
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
NA | NA | New tag in HTML5 |
Attributes used with the <figcaption> tag
NONE
Global Attributes
The <figcaption> tag supports Global attributes.
Event Attributes
The <figcaption> tag supports Event attributes.
Supporting Browsers
Related Tags
<figure> tag.