HTML NAVIGATOR

The <nav> element

The <nav> element defines a block of navigation links, either within the current document or to other documents. Note, that not all links in the HTML document can be placed inside the <nav> element; it can only include major navigation blocks. For example, the <nav> tag cannot be placed in the <footer> tag for defining links in the footer of the website.

Take a look at the example below:

The code:

<!DOCTYPE html>

<html>

<head>

            <title></title>

</head>

<header>

            <h1>My First Website</h1>

             </header>

<body>

            <nav>

                        <a href=”#”> MENU</a>

                        <a href=”#”> CONTACT US</a>

                        <a href=”#”> ABOUT US</a>

            </nav>

            <hr>

<p> Tom and Jerry, American animated cartoon series about a hapless cat’s never-ending pursuit of a clever mouse </p>

</body>

</html>

Scroll to Top