<section> : Section element

Introduction

The <section> element in HTML is a semantic element used to define sections or thematic groups of content within a document. It’s typically used to organize content into distinct sections that represent different themes or topics.

Here’s an example of how you might use the <section> element:

Output :

In this example:

  • Three <section> elements are used to divide the content into thematic sections: “About Us“, “Services“, and “Contact Us“.
  • Each <section> contains related content, such as information about the company, a list of services, or contact details.
  • The <h2> elements inside each section provide a heading for that particular section, helping to structure and organize the content.

Using <section> elements helps improve the semantic structure of the HTML document, making it more accessible to users and search engines and providing a clear hierarchy of content.

Leave a Comment