w3schools menu html code example

Example 1: menu bar html

<i class="fa fa-bars" aria-hidden="true"></i>

Example 2: how to create a menu with html and css

<head>
    <meta charset="utf-8">
    <title>Page title</title>
    <style>
      #navbar {
        margin: 0;
        padding: 0;
        list-style-type: none;
        width: 100px;
      }
      #navbar li {
        border-left: 10px solid #666;
        border-bottom: 1px solid #666;
      }
      #navbar a {
        background-color: #949494;
        color: #fff;
        padding: 5px;
        text-decoration: none;
        font-weight: bold;
        border-left: 5px solid #33ADFF;
        display: block;
      }
    </style>
  </head>
 
  <body>
   
    <ul id="navbar">
      <li><a href="#">Home</a></li>
      <li><a href="#">News</a></li>
      <li><a href="#">Contacts</a></li>
      <li><a href="#">About us</a></li>
    </ul>
 
  </body>
</html><div class="open_grepper_editor" title="Edit & Save To Grepper"></div>

Tags:

Css Example