About horizontal nav bars with UL and anchor - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:a

Description

About horizontal nav bars with UL and anchor

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
#nav ul {<!--from w  w w  .j av  a  2  s .c o  m-->
   list-style-type:none;
   margin:0;
   padding:0;
   width:100%;
   float:left;
   text-align:center;
}

#nav ul li {
   display:inline-block;
   padding:0 11px;
}
</style> 
 </head> 
 <body translate="no"> 
  <div id="nav"> 
   <ul> 
    <li> <a href="#">Anchor 1</a> </li> 
    <li> <a href="#">Anchor 2</a> </li> 
    <li> <a href="#">Anchor 3</a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials