Name

figure — HTML5

Synopsis

<figure> . . . </figure>

Indicates some set of self-contained content that is referred to from the main content, such as illustrations, code examples, diagrams, poems, and so on. The figure element may contain (in any order) one dd element that provides the figure content and, optionally, one dt element that provides the figure caption or title. If there is no dt element, the figure will have no caption.

Notes

HTML5 only.

Start/End Tags

Required/Required

Attributes

HTML5 Global Attributes

Examples

<figure>
   <dd><img src="tacocat.jpg" alt="a cat eating a taco">
  </dd>
</figure>

<figure>
<dt>Sample CSS rule</dt>
<dd>
   <pre>
body {
  background-color: #000;
  color: red;
}
  </pre>
</dd>
</figure>

Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.