The header
element marks the header of a section.
The header
element cannot be a descendent of the address or footer element.
<header> |
Yes | 9.0 | Yes | Yes | Yes |
The <header> tag is new in HTML5.
The <header> tag supports the Global Attributes in HTML.
The <header> tag supports the Event Attributes in HTML.
header { display: block; }
A demo showing how to use <header> tag.
<!DOCTYPE HTML>
<html>
<body>
<header>
<hgroup>
<h1>H1</h1>
<h2>H2</h2>
</hgroup>
</header>
<section>
<header>
<h1>H1</h1>
</header>
</section>
</body> <!-- ww w . j a va2 s.c o m-->
</html>