Horizontal Navigation Bar:-
In the horizontal navigation bar all the content will be in horizontal format.
EXAMPLE:-
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: turquoise;
}
.active {
background-color: steelblue;
}
</style>
</head>
<body>
<h3> Horizontal Navigation Bar </h3>
<p>In this example, Active class is
in a Steelblue background color and
a white text.</p>
<ul>
<li><a class="active" href="#home">
Home</a></li>
<li><a href="#news">Content</a>
</li>
<li><a href="#contact">Contact</a>
</li>
<li><a href="#about">About</a>
</li>
</ul>
</body>
</html>
OUTPUT:-
![]() |
| sk. |

No comments:
Post a Comment