How to use the HTML <figcaption> Element

The <figcaption> element is used to add captions for the <figure element. It’s often used to add image captions.

Code example:

<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