Home > Articles > Web Development > HTML/CSS

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

2.6 Figures with "figure" and "figcaption"

The elements figure and figcaption do not really count among the structural elements, but they are still a welcome addition to our options in structuring the integration of independent pictures, graphics, diagrams, and code lists. Each figure element can have only one figcaption element. It is up to the author whether this is placed before or after the figure in question. A brief example with markup and its browser implementation (see Figure 2.6) could look like this:

<img src="images/tarot_0980.jpg" alt="XXI: The World">
<img src="images/tarot_0963.jpg" alt="VI: The Choice">
<img src="images/tarot_0996.jpg" alt="XVIII: The Moon">
<figcaption> Three magical sculptures in Niki de Saint
 Phalles <em>Giardino dei Tarocchi</em> near Capalbio in the
 Tuscany region of Italy. The tarot cards from left to right:
 The World (XXI), The Choice (VI), and The Moon (XVIII)</figcaption>
Figure 2.6

Figure 2.6 Example of "figure" with "figcaption"

  • + Share This
  • 🔖 Save To Your Account