html tutorial - Figure <figure> tag in HTML - html5 - html code - html form
Learn html - html tutorial - figure tag in html - html examples - html programs
- The <figure> tag is used to specifies self-contained content, like diagrams, photos, code listings, illustrations, etc.
- The <figure> element content is related to the main flow.
- The <figure> element position is independent of the main flow.
- If removed the <figure>element is should not affect the document flow.
- <figure> tag supports Global Attributes and Event Attributes.
Syntax for Figure:
Differences between HTML 4.01 and HTML5
- The HTML 4 is does not supports <figure> tag.
- The HTML 5 is supports <figure>tag.
Sample Coding for <figure> tag:
Code Explanation for <figure> tag:
- The <figure>tag is used to give the image and alternative text for an image with a specific size.
Output of <figure> tag:
- The output shows the wikitechy logo by using <figure>tag.
Browser Support for <figure> tag in HTML:
- The <figure>element is adding a caption by using <figcaption> element.