Back to TILs.

Calmcode TIL

Figures and Captions logoFigures and Captions

Notice something interesting about the images below.

Cat
A kitty! Originally found here.
Cat
Another kitty, originally found here.

They contain a caption! This is featured via <figure> tags in html which allow you to nest a <figcaption>.

<figure>
  <img src="path/to/image.png" alt="Image description">
  <figcaption>Extra text.</figcaption>
</figure>

It's a small detail, but it will allow you maybe add just that extra bit of context to an image!


Back to main.