Description

The <figcaption> element defines a caption or legend for a figure.

The following table summarizes the usages context and the version history of this tag.

Placement:Block
Content:Block,inline and text
Start/ End Tag:Start tag: required, End tag: required
Version:HTML 5

Syntax

The basic syntax of the <figcaption> tag is given with:

HTML/XHTML: <figcaption> ... </figcaption>

The example below shows the <figcaption> tag in action.

<figure>
    <img src="discovery.jpg" alt="Space Shuttle">
    <figcaption>NASA - Space Shuttle Discovery</figcaption>
</figure>

Note: The only permitted parent element for the <figcaption> element is the <figure> element. The <figcaption> element must be its first or last child.

Tag-Specific Attributes

The <figcaption> tag doesn't have any specific attribute.

Global Attributes

Like all other HTML tags, the <figcaption> tag supports the global attributes in HTML5.

Event Attributes

The <figcaption> tag also supports the event attributes in HTML5.

Browser Compatibility

Element
<figcaption>YesYesYesYesYes