Menu
The <figure> and <figcaption> Tags

Barney the mouse
<figure style="width:209px;">
    <img src="mouse_pixabay.jpg" />
    <figcaption>Barney the mouse </figcaption>
</figure>

The <figure> element is a container for an image and optionally for a <figcaption> element that defines a caption for that image.

Barney the mouse
<figure style="width:209px;">
    <img src="mouse_pixabay.jpg" />
    <figcaption>Barney the mouse</figcaption>
</figure>

Note that the <figure> element is a block level element, so if you don't want it to expand horizontally across the entire page, you must use a style to set its width.

Barney the mouse is a very friendly mouse

Note in the example above that if your caption is more than one line, the <figcaption> element automatically wraps your text.


<figure style="border-style:solid; padding:8px; width:209px;">
    <img src="mouse_pixabay.jpg" />
    <figcaption style="text-align:center;">Barney the mouse is a very friendly mouse</figcaption>
</figure>

In the example above I added a border style and a padding style to the <figcaption> element to make it look more like a photograph. I also added the text-align:center style to the <figcaption> element to center the caption under the image.


Learn more at amazon.com

More HTML Code:
• HTML5 Input Type - URL
• Aligning an Image on Your Web Page
• HTML5 Spinbox Control
• Most Usefull ASCII Character Code Entities
• HTML Bulleted or Unordered List
• HTML center Tag
• Radio Button Basics
• Use Datalist Tag to Specify Pre-defined Text for Input Element
• HTML5 role Attribute
• Make an HTML Element Editable