figure tag

 



  • The figure element is particularly useful for images, illustrations, diagrams, videos, audio clips, and other types of media.
  • Use the alt attribute for images within the figure element to provide alternative text for accessibility.
  • The figure element helps improve accessibility and search engine optimization by indicating the content and its context.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
        @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Urbanist:wght@300;400;600;700;800;900&display=swap");

        html {
            font-family: "jost", sans-serif;
            background-color: #efefef;
        }

        h1 {
            font-weight: bold;
        }

        img {
            box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
            border-radius: 8px;
        }
    </style>
</head>

<body>
    <h1>HTML FIGURE TAG</h1>
    <p>
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum nihil magni illum. Ullam delectus cum corporis
        illo suscipit est excepturi eveniet blanditiis dicta officia, mollitia fugit saepe temporibus nesciunt
        quibusdam!
    </p>
    <!-- add figure tag here  -->
    <figure>
        <img src="../images/E3CCA633-C689-4DD9-8B20-79E7C5A88487.jpg" alt="my image" width="500" height="auto" />
        <figcaption>This is my image</figcaption>
    </figure>
    <p>
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque dignissimos repellendus libero odio delectus
        quisquam a in, at quos vitae deserunt ipsam non odit maiores quis? Ea vitae officiis impedit.
    </p>
</body>

</html>


Related Posts:

  • HTML Attributes What is an HTML Attribute?HTML attributes provide additional information about HTML elements. Attributes are always specified in the start … Read More
  • Paragraph Horizontal and Line Break Tags The <p> tag defines a paragraph.Browsers automatically add a single blank line before and after each.<p>This is a paragraph.</p&g… Read More
  • HTML Comments it is used to understand the code written by someone.the browser will ignore the comments Types of Comments in HTMLSingle-line CommentsSing… Read More
  • Heading Tags The <h1> to <h6> tags create headings in HTML.where <h1> is the biggest and most important, and <h6> is the smallest and… Read More
  • Anchor Tag <a> tag defines a hyperlink, which is used to link from one page to another page.Key Characteristics of HTML Anchor LinksSpecified by the … Read More

0 Comments:

Post a Comment

Do leave your comments