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

HTML section tag


section tag in HTML:

The "section" tag in HTML is used to outline a thematic grouping or phase of content within a web site.

It allows prepare and structure the content material, making it extra semantically significant and aiding in accessibility and seo.

Example

The "section" tag is like a virtual compartment.

It's used to create a distinct, self-contained part of content inside a web site, often representing a thematic grouping or subject matter.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>About Us</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      text-align: center;
      margin-top: 50px;
      font-size: 18px;
    }
    h1 {
      color: #3498db; /* Blue color for heading */
    }
    main {
      margin-top: 20px;
    }
    section {
      background-color: #ecf0f1; /* Light gray background color for section */
      padding: 20px;
      border-radius: 8px; /* Rounded corners for section */
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Box shadow for section */
    }
    p {
      margin-top: 10px;
      color: #34495e; /* Dark blue-gray color for text */
    }
  </style>
</head>
<body>
  <h1>About Us</h1>
  <main>
    <section>
      <p>We are a dedicated team...</p>
    </section>
  </main>
</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.