HTML5 figure Tag
The <figure> tag in HTML is used to add self-contained content like illustrations, diagrams, photos, or codes listing in a document. It is related to main flow, but it can be used in any position of a document and the figure goes with the flow of the document and if remove it then it should not affect the flow of the document. This tag is new in HTML5.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
<figure> Image content... </figure>
Attributes: It contains mostly two tags which are listed below:
- img src: This tag is used to add an image source in the document.
- figcaption: This tag is used to set the caption to the image.
- Google Chrome 6.0
- Edge 9.0
- Firefox 4.0
- Safari 5.0
- Opera 11.1