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>






            <h1>My First Website</h1>




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

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

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



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



Scroll to Top