The figure and figcaption elements

The figure element is used to annotate various illustrations, diagrams, photographs, etc. And the figcaption element simply wraps the title for the content inside the figure element.

To use the figure element, we need to put some content inside it, for example, an image:

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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>The figure and figcaption elements</title>

</head>

<body>
    <figure>
        <figcaption>The figure and figcaption elements</figcaption>
        <img src="scolar.jpg" alt="The figure and figcaption elements">
    </figure>

</body>

</html>