HTML figcaption Tag - HTML Tutorial

HTML figcaption Tag

BLUF: Mastering HTML figcaption Tag is a fundamental step in becoming a web developer. This guide covers the structure, syntax, and best practices for using this HTML element effectively.
Key Lesson: HTML figcaption Tag

Web structure starts with solid HTML. Learn how HTML figcaption Tag contributes to accessible and semantic web pages in the tutorial below.

The <figcaption> tag is employed to supply a description for an image.

It is a tag that is not mandatory and has the flexibility to be positioned either before or after the content enclosed by the <figure> tag.

Only one <figcaption> element can be nested within a <figure> tag although the <figure> element itself may contain multiple other elements like <img> or <code>.

The <figcaption> element is used with <figure> element and it can be placed as the first or last child of the <figure> element.

HTML figure tag example

Example

<figure>

  <img src="https://placehold.co/400x300/1abc9c/ffffff?text=Sample+Image" alt="Taj Mahal"/>

<figcaption>Fig.1.1 - A front view of the great Taj Mahal in Agra.</figcaption>

</figure>

Output:

Supporting Browsers

Element Chrome IE Firefox Opera Safari
<figcaption> Yes Yes Yes Yes Yes

Note: HTML figcaption tag also supports the global and event attribute in HTML.

Input Required

This code uses input(). Please provide values below:

Logic Practice
Install Logic Practice
Add to home screen for a faster app-like experience