how to create menu bar using HTML and CSS

 How to create menu bar using HTML and CSS








save as

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Navbar</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
    <nav>
<h2>Logo</h2>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contract</a></li>

</ul>

    </nav>
</body>
</html>





SAVE AS-

Style.css

*{
    margin :0px;
    padding: 0px;
    box-sizing: border-box;
}
nav{
    width: 100%;
    background-color: aqua;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}
nav h2{
    color: aliceblue;
}
nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
}
nav ul li{
    list-style: none;
    padding: 0px 5px;
}
nav ul li a{
    color: aliceblue;
    font-size: 15px;
    text-decoration: none;
}

Comments

Popular posts from this blog

Trading Live Advance Chart Source code HTML CSS & JS

How to show live Cryptocurrency Price In your website Using HTML CSS, AND JavaScript

Learn Python 2024 by gaurav tripathi