<figcaption> HTML Tag
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- Element of
- Web Images: Best Practices and HTML Code In One Useful Guide
- What does
<figcaption> HTML Tag
do? - The <figcaption> element is used as a child of a parent <figure> element to attach a caption to the image, table, or chart contained in the <figure> element.
- Display
- block
Code Example
<figure>
<img src="/wp-content/uploads/flamingo.jpg" alt="flamingo">
<figcaption><i>fig. 1</i> A pink flamingo.</figcaption>
</figure>
The <figure>
element
The <figcaption>
element must be a child of a <figure>
element. Moreover, it must be the first or last child element inside a <figure>
, and there can be no more than one <figcaption>
inside a <figure>
. (There can be no caption at all — it is not required.) The content of the <figcaption>
should be text describing the content of the <figure>
. For more information, see the <figure>
element documentation.
Browser Support for figure
11 | 43 | 45 | 13 | 9 | 34 |