The HTML Section Tag is used to classify portion or segment in an HTML resource or webpage.
The HTML Section Tag can be used to create segments like headers, footers, chapters etc.
Note: Section Tag is new in HTML 5.
HTML Section Tag Syntax
<section> Some Text here </section>
HTML Section Tag Example
|HTML Section Tag Code||Output|
<section> <h1>Computer</h1> A Computer is an electronic device which can take data as input, process the data and can output the results in a desired manner </section> <section> <h1>Software</h1> A Software is a piece of computer code which enables any desired computation.</section>
In the above HTML Section Tag example output, note that the definition of “Computer” and “Software” are displayed segregated from each other and that’s because both the definitions are in their respective sections.
HTML Section Tag supports HTML Global Attributes and HTML Event Attributes.
HTML Section Tag Supporting Browsers