×
   ❮     
HTML CSS MySql Javascript SQL PYTHON JAVA C++ C# BOOTSTRAP REACT XML NODEJS ANGULAR DJango Rust Android VUE
     ❯   

HTML Figure tag


Figure tag in HTML:

<figure> tag as a little picture frame on your webpage.

It's a way to highlight something that goes along with your main text, but can kind of stand on its own.

Example

The "figure" tag is like a digital frame for visual or multimedia content.

It's used to group and semantically represent self-contained content, often accompanied by a caption.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Nature's Beauty</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      text-align: center;
      margin-top: 50px;
      font-size: 18px;
    }
    h1 {
      color: #2c3e50; /* Dark gray color for heading */
    }
    .image {
      max-width: 100%;
      height: auto;
      border-radius: 8px; /* Rounded corners for the image */
      margin-top: 20px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Box shadow for a subtle lift */
    }
    figcaption {
      margin-top: 10px;
      color: #34495e; /* Dark blue-gray color for caption text */
    }
  </style>
</head>
<body>
  <h1>Nature's Beauty</h1>
  <figure>
    <img src="sample.jpg" alt="Beautiful landscape" class="image">
    <figcaption>A breathtaking view of a serene landscape.</figcaption>
  </figure>
</body>
</html>
Try it Yourself »

Hey there! Let's go for Learn fasta then! It is more than just coding; it is to have the superpower that can solve any problem. Through simple and easy-to-grasp examples you will sail through the learning process. In addition, it is not just about coding– you will acquire competencies on how to solve complex problems, analyze data, and come up with efficient solutions. Shall we start this wonderful journey together! learnfasta.com terms of use, Copyright 2025 All Rights Reserved.