HTML <figure> tag

Updated: 11/13/2018 by Computer Hope
HTML figure tag

When writing in HTML (hypertext markup language), the <figure> tag is a block element used to designate self-contained content that does not affect the main flow of the article. It is useful with items like diagrams, illustrations, images, and sections of computer code. The following sections contain information about the <figure> tag, including an example of it in use, and related attributes and browser compatibility.

Tip

The <figcaption> tag is used to add a caption to a figure.

Example of <figure> code

<figure>
<img src="../../chguy.gif" width="57" height="120" alt="Computer Hope Guy">
<figcaption>Figure A - Computer Hope guy.</figcaption> </figure>

Example result

Computer Hope Guy
Figure A - Computer Hope guy.

Attributes

All HTML tags support standard attributes that define the settings of an HTML element. Unlike other HTML tags, the <figure> tag has no unique attributes.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions 9.0+ 4.0+ 5.1+ 11.1+ 8.0+

Browser, Code, Compatibility, Container tag, Diagram, HTML area tag, HTML article tag, Illustration, Image, Web design terms