Last Updated on April 26, 2023 by Roshan Parihar
HTML section tag is used to show sections of content in webpages.
Syntax
1 |
<section>sectional content goes here..</section> |
1 2 3 4 5 6 7 8 |
<section id="one"> <h3>specification one</h3> <p>This is the paragraph in section one</p> </section> <section id="two"> <h3>specification two</h3> <p>This is the paragraph in section two</p> </section> |
Output
specification one
This is the paragraph in section one
specification two
This is the span content in section two
The example contains two sectional content. The first section with id one, showing HTML h3 tag and HTML paragraph tag. Second sectional content with id two, showing HTML h2 tag and HTML span tag.
Resources and References of HTML section tag
1. W3C Specification.
2. HTML living standard
3. W3C project using Github