Skip to content
Related Articles
Open in App
Not now

Related Articles

How to create a caption for a figure element using HTML5 ?

Improve Article
Save Article
  • Last Updated : 11 Jun, 2020
Improve Article
Save Article

In this article, you learn how to create a caption for a figure element by using the <figcaption> tag in the document. This new tag in the HTML5 page is used to set a caption to the figure element in a document.


<figcaption> Figure caption </figcaption>

Example: The following example demonstrates to apply caption for a HTML figure element.

<!DOCTYPE html>
        How to define a caption 
        for a figure element?
        body {
            text-align: center;
        h1 {
            color: green;
        HTML5: How to define a 
        caption for a figure 
        <img src=
        alt="gfglogo" style="width:50%">
            GeeksforGeeks Logo


Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!