VOOZH about

URL: https://www.geeksforgeeks.org/html/html5-figure-tag/

⇱ HTML5 figure Tag - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML5 figure Tag

Last Updated : 21 May, 2026

The <figure> tag in HTML is used to include self-contained content like images, diagrams, or code that is related to the main content but can stand independently.

  • Used for illustrations, images, diagrams, or code snippets.
  • Content is related to the main flow but can be moved or removed without affecting it.
  • Introduced in HTML5 for better semantic structure.

Syntax:

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

Attributes

  • <img src="">: The img src attribute is used to specify the image source and add an image to the document.
  • <figcaption>: The figcaption tag is used to provide a caption or description for the content inside the <figure> element.

Example: Implementation of figure tag.

Comment
Article Tags: