Skip to main content

HTML <section> Tag

The <section> HTML element is used to divide a web page into separate, distinct sections. With sections, you can break up large blocks of content into more manageable pieces, which makes it easier to parse through. Additionally, using a heading within each section helps to categorize the content further and make it more searchable.

The tag allows you to create meaningful sections in your document which can be used to break up the text, add visual cues, or draw attention to certain topics.

Using the <section> HTML element makes it easier for search engines to index and categorize the content on your page, improving the chances of users finding relevant information quickly and easily.

Using the <section> element is quite simple — all that's required is to open an empty <section> tag, enter any HTML content you wish to display within it, and then close the tag with </section>.

<h1>Benefits of Eating Apples</h1>
<section>
   <h2>Nutrition Information </h2>
   <p>Apples are a great source of essential vitamins and minerals including Vitamin C, potassium, and magnesium. </p>
</section>
<section>
    <h2>Other Benefits</h2>
    <p>Apples have also been linked to improved digestion and reduce risk of certain diseases. </p>
</section >

The <section> tag provides added semantic meaning compared to arbitrary divs or spans, which can make accessibility features such as screen readers work better for visually impaired users.