<

HTML <figure> Tag

The <figure> tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.

While the content of the <figure> element is related to the main flow, its position is independent of the main flow, and if removed it should not affect the flow of the document.

Example




<!DOCTYPE html>
<html>
<head>
<style>
figure {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 60px;
    margin-right: 60px;
}
</style>
</head>
<body>

<p>A figure element is displayed like this:</p>

<figure>
  <img src="/logo.png" alt="logo" width="304" height="228">
</figure>


</body>
</html>
















© copyright 2017-2022 Completedone pvt ltd.