HTML DOM Nav Object

Nav Object HTML5

The Nav Object is new in HTML5.

The Nav object represents an HTML <nav> element.

Note: The <nav> element is not supported in Internet Explorer 8 and earlier versions.

Access a Nav Object

You can access a <nav> element by using getElementById():


var x = document.getElementById("myNav");
Try it Yourself »

Create a Nav Object

You can create a <nav> element by using the document.createElement() method:


var x = document.createElement("NAV");
Try it Yourself »

Standard Properties and Events

The Nav object supports the standard properties and events.

Related Pages

HTML reference: HTML <nav> tag