HTML and CSS Reference
In-Depth Information
The header can also contain navigation. This can be very use-
ful for site-wide navigation, especially on template-driven sites
where the whole of the
<header>
element could come from a
template file. So, for example, the horizontal site-wide navigation
on
www.thaicookery.co.uk
could be coded as shown. You can
see the result in
Figure 1.6
.
<header>
<hgroup>
<h1>Thai Cookery School</h1>
<h2>Learn authentic Thai cookery in your own home.</h2>
</hgroup>
<nav>
<ul>
<li>Home</li>
<li><a href=”courses.html”>Cookery Courses</a></li>
<li><a href=”contact.html”>Contact</a></li>
</ul>
</nav>
</header>
FIguRE 1.6
Header for
Of course, it's not required that the
<nav>
be in the
<header>
.
The Thai cookery example could just as easily be marked up
with the main
<nav>
outside the
<header>
:
<header>
<hgroup>
<h1>Thai Cookery School></h1>
<h2>Learn authentic Thai cookery in your own home.</h2>
</hgroup>
</header>
<nav>
<ul>