6.4. Tag images that have captions with <figure role="group"> and <figcaption>

Images that have captions should be tagged with <figure role="group"> and <figcaption>.

The <figure role="group"> element should include the image AND the legend, and the legend should be tagged with <figcaption>.

Note

The alternative text (i.e. alt attribute for the <img /> tag) should contain a reference to the caption.

Example 1

Three llamas in the Bolivian desert.
Bolivian desert, picture by Audesou, February 2013.
<figure role="group">
   <img src="…" alt="Three llamas in the Bolivian desert." />
   <figcaption>
      Bolivian desert, picture by Audesou, February 2013.
   </figcaption>
</figure>

Example 2

Three llamas in the Bolivian desert [photo 1]
Photo 1: Bolivian desert, picture by Audesou, February 2013.
<figure role="group">
   <img src="…" alt="Three llamas in the Bolivian desert [photo 1]" />
   <figcaption>
      Photo 1: Bolivian desert, picture by Audesou, February 2013.
   </figcaption>
</figure>

Comments

Add a comment

Required fields are marked *.

Back to top