The <section> element is new to HTML5 and marks a section of a document.
<section> |
Yes | Yes | Yes | Yes | Yes |
The <section> tag is new in HTML5.
The <section> tag supports the Global Attributes in HTML.
The <section> tag supports the Event Attributes in HTML.
section { display: block; }
A demo showing how to use <section> tag.
<!DOCTYPE HTML>
<html>
<head>
<style>
section{ <!-- w w w.ja v a 2 s .c o m-->
background: grey;
color: white;
font-size: 1em;
margin-top: 0px;
}
</style>
</head>
<body>
<section>
<hgroup>
<h1>H1</h1>
<h2>H2</h2>
</hgroup>
<section>
<h1>H1 of section</h1>
<p>This is a paragraph.</p>
</section>
</section>
</body>
</html>