The HTML <figure> Element

Learn the basics of how to use the HTML <figure> Element.

The <figure> tag is used to create figure elements in HTML:

<figure>
  <!-- Put stuff here -->
</figure>

The <figure> element is used to mark up self-contained content such as illustrations, photos, and code examples:

<figure>
  <img src="path-to-file" alt="Description" />
</figure>

The <figcaption> element is often used to add captions for the <figure element, especially for images:

<figure>
  <img src="path-to-image.jpg" alt="Description of image" />
  <figcaption>Caption for photo</figcaption>
</figure>

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊

Kofi

Share & Discuss on