HTML5: Putting site navigation <nav> links at <header>

This entry is part 7 of 34 in the series HTML5

HTML5 also introduces site navigation element <nav>.

We can put <nav> at the header so that they are shown on the top of the page.

<!DOCTYPE html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title> - HTML 5</title>
        nav li {
            display: inline;

        <h1>Great Music News</h1>

        <h3>Latest news on Rock, Metal and Pop music!</h3>
            <li><a href='#'>Home</a></li>
            <li><a href='#'>British Pop</a></li>
            <li><a href='#'>Rock</a></li>
            <li><a href='#'>Country</a></li>
            <li><a href='#'>About</a></li>
            <li><a href='#'>Contact</a></li>


Note that we have styled the navigation links to be inline using display: inline.



Series Navigation<< HTML5: Using the <header> element for site header
HTML5: Multiple <header> on one page >>