HTML Tags

HTML5 <nav> Tag

Topic: HTML5 Tags ReferencePrev|Next

Description

The <nav> element defines a section of navigation links (i.e. links to other pages or to parts within the page itself) in a document.

The following table summarizes the usages context and the version history of this tag.

Placement: Block
Content: Block, inline, and text
Start/End Tag: Start tag: required, End tag: required
Version: New in HTML5

Syntax

The basic syntax of the <nav> tag is given with:

HTML / XHTML: <nav> ... </nav>

The example below shows the <nav> tag in action.

<nav>
    <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Contact</a></li>
    </ul>
</nav>

Tip: It is not necessary to place all the links within a <nav> element. It is intended for major block of navigation links. The <nav> element is typically a replacement for the <div class="nav"> statement, frequently used in HTML.


Tag-Specific Attributes

The <nav> tag doesn't have any specific attribute.


Global Attributes

Like all other HTML tags, the <nav> tag supports the global attributes in HTML5.


Event Attributes

The <nav> tag also supports the event attributes in HTML5.


Browser Compatibility

The <nav> tag is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 4+
  • Google Chrome 6+
  • Internet Explorer 9+
  • Apple Safari 5+
  • Opera 11.1+

Further Reading

See tutorial on: HTML Links, HTML Layout, HTML Lists.

Related tags: <a>, <header>, <footer>, <section>, <article>.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties