HTML and CSS Reference
In-Depth Information
Grouping <nav> and other
elements in a sidebar
Many sites have a sidebar that includes multiple blocks of navi-
gation and other non-navigation content. Take, for example, my
personal site www.brucelawson.co.uk ( Figure 1.8 ).
FIGURE 1.8 My blog sidebar,
mixing navigation with colophon
information and pictures of hunks.
The sidebar on the left of the main content has many nav areas
(not pictured) such as pages, categories, archives, and most
recent comments. These are marked up as a series of <nav> ele-
ments (a single <nav> containing a list with sublist is also possible
but I prefer to use discrete <nav> elements for each type of nav).
The <nav> elements contained in the new <aside> element
“can be used for typographical effects like pull quotes or side-
bars, for advertising, for groups of nav elements, and for other
content that is considered separate from the main content of
the page.” http://dev.w3.org/html5/spec/semantics.html#
the-aside-element .
<aside>
<nav>
<h2>Pages</h2>
<ul> .. </ul>
</nav>
...
 
Search WWH ::




Custom Search