Tsallaka zuwa abun ciki
Justice Tech School

Figure and Caption

figure groups content such as an image, diagram or code with an optional figcaption caption. It is a self contained unit that could move without breaking the text.

Example
<figure>
  <img alt="Teal" width="140" height="70" src="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27140%27 height=%2770%27%3E%3Crect width=%27140%27 height=%2770%27 fill=%27%2314b8a6%27/%3E%3C/svg%3E">
  <figcaption>Figure 1: A teal box</figcaption>
</figure>

Exercise

Caption element.

<>Caption</figcaption>

Quiz Test

What does figure wrap?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.