Website Layout-(HTML and CSS)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flexbox Website Layout</title>
<link rel="stylesheet" href="styles.css">
</head>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
}
header {
background-color: #034469;
color: #fff;
text-align: center;
padding: 20px 0;
}
nav {
background-color: rgb(59, 57, 59);
color: #fff;
text-align: center;
padding: 10px 0;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav ul li {
display: inline;
margin: 0 10px;
}
nav ul li a {
text-decoration: none;
color: #fff;
}
main {
display: flex;
justify-content: center;
align-items: center;
height: 70vh;
}
section {
text-align: center;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 20px 0;
}
</style>
<body>
<header>
<h1>My Website</h1>
</header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<main>
<section>
<h2>Welcome to My Website</h2>
<p>This is the main content area of the website.</p>
</section>
</main>
<footer>
<p>© 2024 My Website. All rights reserved.</p>
</footer>
</body>
</html>
Comments
Post a Comment