HTML5 and Web Page Structure
Header Element
The Header Element or Tag has been introduced for producing better content structure in HTML documents:
The code:
<header></header>
Represents a group of introductory or navigational aids.
A header element can contain the section's heading (an h1-h6 element or hgroup element), but is not required.
The header element can also be used to wrap a section's table of contents, a search form, or any relevant logos.
The Header Element should not be used with sections. Rather use the Hgroup Element. Better still the h1-h6 Elements.
Code examples:
The code below shows one instance of using a header element on a web page.
<body>
<header>
<h1>Page Title</h1>
<nav>
<h1>Navigation</h1>
<ul>
<li><a href="index.html">Index of all articles</a></li>
<li><a href="foo1.html">Article Link 1</a></li>
<li><a href="foo2.html">Article link 2</a></li>
</ul>
</nav>
</header>
Notice that the Nav element can be nested inside the header or placed below it (Shown below). Both are accepted practices.
There are other ways to use the header element which you can pursue if interested.
New Elements and Beginners
Some of the new tags used as shown below might make the body code of a basic HTML5 document easier to read.
This structure can be used instead of using class customized divisions .
<body>
<header></header>
<nav></nav>
<div class="main">
Text and pics here
</div>
<footer></footer>
</body>
*Use of the new tags article, section, header, footer, hgroup, nav and aside is a matter of the taste or the need of the author.
Note: some of these elements overlap in purpose.
The Header Element accepts Global Attributes.
For a complete list of New Elements visit W3.org
Next see: The Division Tag and the Section Element