The purpose of the HTML
<figure> tag is to
attach an image, infographic, diagram, etc., to an HTML document.
This tutorial gives a brief description of the HTML
What is HTML Figure Tag?
<figure> tag in HTML is for
enclosing self-contained elements such as diagrams, images, photos,
infographics, etc., listed in an HTML document. These elements
belong to the main flow of content, but users can use them in any
position in an HTML document. The attached figure goes with the
flow of the document, and if users remove elements, it should not
affect the flow of the original HTML document. This tag is the
latest in HTML5.
Some Attributes of the HTML <figure> Tag Are as Follows:
- src – This attribute associates the image source with the original HTML document.
- Figcaption – This attribute specifies a caption for the attached image.
An example of using the HTML figure tag:
<figure> <img src="sample.png" alt="Image within HTML Figure Tag"> <figcaption>Fig.1 - The Image, HTML Figure Tag, HTML, Figure Attribute</figcaption> </figure>