HTML Tag Reference - HTML tag <figcaption>








The <figcaption> tag adds a caption to a <figure> element.

Browser compatibility

<figcaption> Yes Yes Yes Yes Yes

What's new in HTML5

The <figcaption> tag is new in HTML5.

Global Attributes

The <figcaption> tag supports the Global Attributes in HTML.

Event Attributes

The <figcaption> tag supports the Event Attributes in HTML.

Default CSS Settings

figcaption { 
    display: block;
}




Example

<!DOCTYPE html>
<html>
<body>
<!--from   w  w w  .  j  a v a  2 s  . com-->
<figure>
  <img src="http://java2s.com/style/demo/border.png" alt="border" >
  <figcaption>Fig.1 - A border image.</figcaption>
</figure>

</body>
</html>

Click to view the demo