HTML5 figcaption Tag
Last Updated :
14 Dec, 2023
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%" >
< figcaption >
GeeksforGeeks Logo
</ figcaption >
</ 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" >
< figcaption >
GFG Logo
</ figcaption >
</ 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
Share your thoughts in the comments
Please Login to comment...