basics of website design banner photo

HTML

HTML 5

CSS 2.1

CSS 3

Reference

HTML5 <nav> Element

The <nav> element specifies a section of navigation i.e. a group of navigational links.

In HTML 4 there is no way of distinguishing navigation from other elements in a document, it is placed most often in divs or lists so that styles can be effectively added. The <nav> element gives you a way of highlighting the main navigation on a site. As the W3C say in the current draft for HTML5:

Not all groups of links on a page need to be in a <nav> element — the element is primarily intended for sections that consist of major navigation blocks.

Highlighting the main navigation on a site can benefit users of screen readers which can be set up to recognize to <nav> elements instead of having to look through a series of divs to locate the navigation.

The W3C also state that any links in a page footer should be placed in a <footer> element and not a <nav> element.

<nav> Attributes

New HTML5 Elements