asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > FIGURE Element

<figure> Element


Represents self-contained content, optionally with a caption.HTML 5

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

The <figure> element represents self-contained content, optionally with a caption.

The element may be used to annotate photos, illustrations, diagrams, quotations, code snippets, etc.

A caption can be associated with the element by inserting a <figcaption> within its start and end tags.

<figure>
   ...
   <figcaption> ... </figcaption>
</figure>

The figure, its caption, and its contents are referenced as a single unit.

While the content of the <figure> element is related to the main flow, its position is independent of the main flow, and if removed, should not affect the flow of the document.

Attributes

The <figure> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

The following example shows how the <figure> element may be used.

<figure>
   <img src="/shared/images/camp_gear.jpg"
      alt="camp essentials" />
   <figcaption><i>Camping essentials</i><figcaption>
</figure>

which would render on a Web page as follows:

camp essentials
Fig. 1. Camping essentials

The following example shows how CSS may be applied to alter the appearance of the contents of the <figure> element.

figure > img { border-radius: 20px 20px 0 0 }
figcaption {
   background-color: darkslategray; color: #fff;
   font: italic smaller sans-serif;
   padding: 8px; text-align: center;
}

which would render on a Web page as follows:

Elephants at sunset
Mother and child elephant at sunset

External References

See Also

FIGCAPTION


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note