HTML5 figcaption Tag
The <figurecaption> tag in HTML is used to set a caption to the figure element in a document. This tag is new in HTML5.
Syntax:
<figcaption> Figure caption </figcaption>
Example 1:
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:
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.0
- Edge 12.0
- Internet Explorer 9.0
- Firefox 4.0
- Opera 11.1
- Safari 5.0
Please Login to comment...