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 »