HTML <figure> and <figcaption> Tag

HTML <figure> Tag

The HTML <figure> tag is a semantic tag that represents self-contained graphical content such as illustrations, diagrams, photos, etc. For example,

<figure>
    <img src="https://cdn.programiz.com/sites/tutorial2program/files/pc_logo.svg" width = "300" height = "247">
</figure>

Browser Output

HTML Figure element with an image

HTML <figcaption> Tag

The HTML <figcaption> tag is used to define the caption for a figure. It is placed as a child element of the <figure> tag along with the content. For example,

<figure>
    <img src="https://cdn.programiz.com/sites/tutorial2program/files/pc_logo.svg" width = "300" height = "247">
    <figcaption>Learn to code for free.</figcaption>
 </figure>

Browser Output

HTML Figure element with an image and a caption

Our premium learning platform, created with over a decade of experience and thousands of feedbacks.

Learn and improve your coding skills like never before.

Try Programiz PRO
  • Interactive Courses
  • Certificates
  • AI Help
  • 2000+ Challenges