HTML5: Creating sidebar with the <aside> Element

This entry is part 11 of 34 in the series HTML5

The aside element is a block of content that is related to its surrounding content.

In current web development, it is common to have a sidebar on the page.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Codecrawl.com - HTML 5</title>
    <style>
        section {
            clear: both;
            border: 2px solid #000;
            padding: 1%;
            width: 50%;
            float: left;
        }

        aside {
            display: block;
            float: left;
            padding: 10px;
        }

        nav {
            width: 200px;
        }
    </style>
</head>
<body>
<section>
    <article>
        <header>
            <h1><a href='#'>Rod Stewart</a></h1>

            <p>17.05.2014</p>
        </header>
        <p>Roderick David 'Rod' Stewart, CBE is a British rock singer-songwriter. Born and raised in London, he is of
            Scottish and English ancestry. Stewart is one of the best-selling music artists of all time, having sold
            over
            100 million records worldwide.</p>
    </article>
</section>

<aside>
    <h3>Related Links</h3>
    <nav>
        <ul>
            <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>
        </ul>
    </nav>
</aside>

</body>
</html>

Series Navigation<< HTML5: Grouping content with <section> element
HTML5: <Footer> element >>