The html5 tutorials

 
About HTML5
Home
Introduction to HTML5
Features of HTML5
Older versions Vs. HTML5
 
Tags  
source
article
aside
audio
canvas
command
datalist
details
embed
figcaption
figure
footer
header
hgroup
keygen
mark
meter
nav
output
progress
ruby
section
summary
time
video
wbr
 

The <figcaption> Tag

The figcaption tag is used to give caption to a figure or a legend. This tag is used along with the figure tag.

This tag could be optional and there should be only one tag of a figcaption within one figure tag irrespective of the number of images/code/graphics that are in the parent figure tag.

The figcaption tag could be placed before or after the object or content but should be within the figure element. The placement order for this tag is for the user to define.

Example code:

<html>
  <body>
    <figure>
      <img src="bmw.jpg" alt="bmw">
      <img src="/chevrolet.jpg" alt="chevrolet">
      <img src="/jaguar.jpg" alt="jaguar">
      <figcaption>Some international cars. From left to right, BMW, Chevrolet and Jaguar. </figcaption>
    </figure>
  </body>
</html>