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> |
Computer
Software |
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
S. No. | Browser | Supported(Yes/No) |
1 | Internet Explorer | Yes |
2 | Firefox | Yes |
3 | Google Chrome | Yes |
4 | Opera | Yes |
5 | Safari | Yes |