w3resource

HTML5 Figcaption Tag Tutorial

Figcaption Tag

In this page, we have discussed Description, Usage, Attributes, Example, Result and Compatibility of HTML5 figcaption tag / element.

The HTML figcaption element (<figcaption>) presents a Caption for an image presented by Figure element.

Usage

<figure>
<img src="/images/w3logo6.png" alt="w3resource Logo"    
width="149" height="52" />
<figcaption>Official Logo of w3resource.com</figcaption>
</figure>

Whether start and end tag are required

Both start and end tag are required.

What an figcaption element can contain

It may contain text - a caption for the associated image.

Which elements can contain figcaption element

Only Figure element can contain a Figcaption element.

Attributes

All the Global Attributes can be used in association with Figcaption element

Example

<!DOCTYPE html >
<head>
<meta charset=utf-8>
<title>HTML5 Figcaption example</title>
</head>
<body>
<figure>
  
<img src="/images/w3logo6.png" alt="w3resource Logo"    
width="149" height="52" />
  
<figcaption>Official Logo of w3resource.com</figcaption>
</figure> 
</body>
</html>

Result

HTML5 Figcaption

Browser Compatibility

We have successfully tested the above example with following browser versions.

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 12.0.742.122 5.0 8.0 11.50 4.0

Previous: HTML5 Figure Element Tutorial
Next: HTML5 footer tag

Test your Programming skills with w3resource's quiz.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/html5/figcaption-tag.php