HTML Tutorial
The <figure>
tag groups related images, diagrams, graphs, audio, video, or code snippets to improve accessibility and styling.
caption
: Provides a caption or description for the figure.<figure>
.<figure>
element.<figcaption>
inside the <figure>
.</figure>
.<!DOCTYPE html>
<html>
<body>
<figure>
<img src="image.jpg" alt="Image of a cat">
<figcaption>This is a photo of a cat.</figcaption>
</figure>
</body>
</html>
alt
attribute on images to provide text descriptions for screen readers.