<?xml version="1.0" encoding="utf-8"?>

The <figure> tag

The <figure> tag

If you have taken our HTML Images lesson, you'd know that for adding an image on a page, we use the <img> tag. What's the <figure> element for? Developers use the <figure> element to specify self-contained content, like illustrations, diagrams, photos, or code snippets.

This tag translates to the browser that the image is a part of the main flow, but its position is independent. If you decide to remove this image, it won't affect the layout. If you look at the syntax, you'll see that the <img> tag is a child of the <figure> element.

Improve your UX & Product skills with interactive courses that actually work