Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTML5 figure Tag

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The <figure> tag in HTML is used to add self-contained content like illustrations, diagrams, photos, or codes listing in a document. It is related to main flow, but it can be used in any position of a document and the figure goes with the flow of the document and if remove it then it should not affect the flow of the document. This tag is new in HTML5.
 

Syntax: 

<figure> Image content... </figure>

Attributes: It contains mostly two tags which are listed below: 
 

  • img src: This tag is used to add an image source in the document.
  • figcaption: This tag is used to set the caption to the image.

Example: 
 

HTML




<!DOCTYPE html>
 
<html>
 
    <body>
 
        <h1>GeeksforGeeks</h1>
        <h2><figure> Tag</h2>
        <!--HTML figure tag starts here-->
        <figure>
            <img src=
            alt="The Pulpit Rock" width="304" height="228">
            <figcaption>Geeks logo</figcaption>
        </figure>
        <!--HTML figure tag ends here-->
       
    </body>
 
</html>                   


Output: 
 

Supported Browsers: 
 

  • Google Chrome 8
  • Edge 12
  • Firefox 4
  • Internet Explorer 9
  • Safari 5.1
  • Opera 11

 

My Personal Notes arrow_drop_up
Last Updated : 22 Jul, 2022
Like Article
Save Article
Similar Reads