The <section> tag in HTML is used to define header, footer, lesson, etc. in an HTML document, which is what we can call the sections.
Let us now see an example to implement the <section> tag −
Example
<!DOCTYPE html> <html> <body> <h1>Profile</h1> <h2>Educational Qualification</h2> <section> <h2>Graduation</h2> <select> <option value="bca">BCA</option> <option value="bcom">B.COM</option> <option value="btech">B.TECH</option> </select> </section> <section> <h2>Postgraduation</h2> <select> <option value="mca">MCA</option> <option value="mcom">M.COM</option> <option value="mtech">M.TECH</option> <option value="msc">M.Sc</option> </select> </section> <section> <p>Worked at ABC Corporation from July 2015 - May 2019 as a Technical Manager.</p> </section> </body> </html>
Output
In the above example, we have set different sections with <select> tag. The first section is −
<section> <h2>Graduation</h2> <select> <option value="bca">BCA</option> <option value="bcom">B.COM</option> <option value="btech">B.TECH</option> </select> </section>
Rest of the two sections are the following −
<section> <h2>Postgraduation</h2> <select> <option value="mca">MCA</option> <option value="mcom">M.COM</option> <option value="mtech">M.TECH</option> <option value="msc">M.Sc</option> </select> </section> <section> <p>Worked at ABC Corporation from July 2015 - May 2019 as a Technical Manager.</p> </section>