Online visitors

People learning around the world

Online

—

Visitors exploring W3Schools

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    HTML Figure Tag

    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 <figure> tag.

    What is HTML Figure Tag?

    Typically, the <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.

    Example:

    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>


    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.