Skip to content
Related Articles
Open in App
Not now

Related Articles

How to Create Navigation Links using HTML5 ?

Improve Article
Save Article
  • Last Updated : 14 Jul, 2020
Improve Article
Save Article

In this article, we create a navigation link by using the <nav> tag in the document. The nav element represents a section of the page whose purpose is to provide navigational links, either in the current document or to other documents. The links in the “nav” element may point to other webpages or to different sections of the same webpage. It is a semantic element. Common examples of the “nav” elements are menus, tables, contents, and indexes.

Syntax:

<nav>
    Links...
</nav>

Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>
        How to create navigation 
        links using HTML5 ?
    </title>
  
    <style>
        .gfg {
            font-size: 40px;
            color: #090;
            font-weight: bold;
            text-align: center;
        }
  
        .nav_tag {
            text-align: center;
            margin: 30px 0;
            font-size: 35px;
        }
    </style>
</head>
  
<body>
    <div class="gfg">
        GeeksforGeeks
    </div>
  
    <div class="nav_tag">
        How to create navigation 
        links using HTML5 ?
    </div>
      
    <nav>
        <a href="#">C++</a> |
        <a href="#">Java</a> |
        <a href="#">PHP</a> |
        <a href="#">Data Structure</a> |
        <a href="#">Algorithm</a>
    </nav>
</body>
  
</html>

Output:

Supported Browsers are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!