<figcaption> Tag in HTML

The <figcaption> tag is used to provide a caption or description for a <figure> element. The <figure> element is often used to wrap media content like images, videos, or illustrations, and the <figcaption> provides additional context for the media.

Key Points on <figcaption> Tag:

Syntax of <figcaption> Tag:

Syntax Example

<figure>
            <img src="image.jpg" alt="Description of image">
            <figcaption>This is an image description</figcaption>
        </figure>

Example of <figcaption> Tag in HTML:

This example demonstrates how to use the <figcaption> tag to add a description to an image inside a <figure> element.

Code Example


        <figure>
            <img src="B1.jpg" alt="A beautiful butterfly">
            <figcaption>This is a beautiful butterfly having multiple colours.</figcaption>
        </figure>
                

Output

A beautiful butterfly
This is a beautiful butterfly having multiple colours.

The <figcaption> tag is especially useful for improving accessibility and SEO, as it provides meaningful context for media elements. It helps users understand the content they are viewing, especially when images or other media elements are used.