Open In App

HTML5 figcaption Tag

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

The <figurecaption> tag in HTML is used to set a caption to the figure element in a document. The <figcaption> element can be placed as the first or last child of the <figure> element. 

Note: This tag is new in HTML5. The <figcaption> tag also supports the Global Attributes and Event Attributes in HTML.

Syntax

<figcaption> Figure caption </figcaption>

Example 1: In this example, we will see the implementation of the figcaption tag.

HTML




<!DOCTYPE html>
<html>
 
<body>
 
    <h1>GeeksforGeeks</h1>
    <h2>
        <figcaption Tag>
    </h2>
    <figure>
        <img src=
             alt="gfglogo" style="width:50%">
       
        <!--HTML figcaption tag starts here-->
       
        <figcaption>
            GeeksforGeeks Logo
        </figcaption>
       
        <!--HTML figcaption tag ends here-->
       
    </figure>
</body>
 
</html>


Output:

Example 2: In this example, we will see the implementation of the figcaption tag.

HTML




<!DOCTYPE html>
 
<html>
 
<body>
    <h1>GeeksforGeeks</h1>
    <h2><figcaption> Tag</h2>
    <figure>
        <img src=
             alt="gfglogo">
       
        <!--HTML figcaption tag starts here-->
       
        <figcaption>
            GFG Logo
        </figcaption>
       
        <!--HTML figcaption tag ends here-->
       
    </figure>
</body>
 
</html>


Output: 

Supported Browsers

  • Google Chrome 8
  • Edge 12 and above
  • Firefox 4 and above
  • Opera 11 and above
  • Safari 5.1 and above


Last Updated : 14 Dec, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads