HTML5 – The figure & figcaption elements
HTML5 introduces many interesting elements like audio, video, Canvas, Drag and Drop, SVG, figure, figcaption etc. Here in this article we we’ll discuss figure and figcaption elements. Actually the <figure> element is used in conjunction with <figcaption> element to mark up photos, diagrams etc.
The <figure> element:
As above mentioned, The <figure> element is used with the element to mark up photos, diagrams etc.
An image within a <figure> element without a caption:

Example code:
- <figure id=“figure”>
- <img src=“img/blue-footed-boobie-bird.jpg” alt=“blue footed boobie bird”>
- </figure>
The <figcaption> element:
The <figcaption> element is used with <figure> element. it is used to add captions, explanations within image. it can be apear before or after the content within the <figure> . We can add only one element within a element, although the <figure> element itself may contain multiple other child elements.
Figure with an image and caption:
Example code:
- <figure id=“figure”>
- <img src=“flying_solo_bird_photography.jpg” alt=“flying solo bird photography” title=“flying_solo_bird_photography” />
- <figcaption>This is flying solo bird photography</figcaption>
- </figure>
A figure with multiple images
Here we we’ll nest multiple images within one <figure> element with a single caption:


The example code:
- <figure id=“figure”>
- <img src=“beautiful_birds-normal.jpg” alt=“beautiful birds normal” />
- <img src=“Puffin.jpg” alt=“Puffin” />
- <img src=“wings_birds_photo.jpg” alt=“wings birds” />
- <figcaption>This is a nest multiple images caption</figcaption>
- </figure>
Follow @phpzag

Hi !
My name is Shipra Bhatia. I am representing Innobuzz Knowledge Solutions P. Ltd.
We have read your blogs on http://www.phpzag.com/ and found the content to be very interesting and resourceful.
I just couldn’t leave your website before suggesting that I really loved the standard information an individual provide for your guests? Is gonna be back frequently in order to check out new posts.