Add Headers and Footers with header and footer
Description
The header
element denotes the header of a section.
It can contain any content that you wish to denote as being the header.
A header element typically contains one h1?h6
element or
an hgroup
element, and it can also contain navigation elements for the section.
The footer
element is the complement to
header and represents the footer for a section.
A footer usually contains summary information about a section and can include details of the author, rights information.
Example
You can see the header and footer elements in the following code.
<!-- ww w . j av a 2 s. c o m-->
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<header>
<hgroup>
<h1>H1</h1>
<h2>by java2s.com</h2>
</hgroup>
</header>
<section>
<header>
<hgroup>
<h1>Section h1</h1>
<h2>Section h2</h2>
</hgroup>
</header>
This is a test.
<section>
<h1>Inner Section h1</h1>
This is a test.
<section>
<h1>More information</h1>
This is test.
</section>
</section>
</section>
<footer id="mainFooter">
©2015, java2s.com. <a href="http://java2s.com">Visit</a>
</footer>
</body>
</html>