HTML figcaption Tag

The <figcaption> tag is employed to supply a description for an image.

It is a tag that is not mandatory and has the flexibility to be positioned either before or after the content enclosed by the <figure> tag.

Only one <figcaption> element can be nested within a <figure> tag although the <figure> element itself may contain multiple other elements like <img> or <code>.

The <figcaption> element is used with <figure> element and it can be placed as the first or last child of the <figure> element.

HTML figure tag example

Example

<figure>

  <img src="https://placehold.co/400x300/1abc9c/ffffff?text=Sample+Image" alt="Taj Mahal"/>

<figcaption>Fig.1.1 - A front view of the great Taj Mahal in Agra.</figcaption>

</figure>

Output:

Supporting Browsers

Element Chrome IE Firefox Opera Safari
<figcaption> Yes Yes Yes Yes Yes

Note: HTML figcaption tag also supports the global and event attribute in HTML.

Input Required

This code uses input(). Please provide values below: