<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern News Blog</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Modern News Blog</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">World</a></li>
<li><a href="#">Technology</a></li>
<li><a href="#">Health</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section class="featured-article">
<img src="https://codezillaye.com/wp-content/uploads/2024/06/fnews.png" alt="Featured Article">
<div class="article-content">
<h2>Featured Article Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</section>
<section class="grid-container">
<article class="grid-item">
<img src="https://codezillaye.com/wp-content/uploads/2024/06/news.jpg" alt="Article 1">
<h3>Article 1 Title</h3>
<p>Short description of article 1.</p>
</article>
<article class="grid-item">
<img src="https://codezillaye.com/wp-content/uploads/2024/06/news3jpg.jpg" alt="Article 2">
<h3>Article 2 Title</h3>
<p>Short description of article 2.</p>
</article>
<article class="grid-item">
<img src="https://codezillaye.com/wp-content/uploads/2024/06/news2.jpg" alt="Article 3">
<h3>Article 3 Title</h3>
<p>Short description of article 3.</p>
</article>
<article class="grid-item">
<img src="https://codezillaye.com/wp-content/uploads/2024/06/news4.jpg" alt="Article 4">
<h3>Article 4 Title</h3>
<p>Short description of article 4.</p>
</article>
</section>
</main>
<footer>
<p>© 2024 codezillaye. All rights reserved.</p>
</footer>
</body>
</html>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background-color: #333;
color: white;
padding: 10px 0;
text-align: center;
}
header h1 {
margin: 0;
}
nav ul {
list-style: none;
padding: 0;
margin: 0;
display: flex;
justify-content: center;
}
nav ul li {
margin: 0 10px;
}
nav ul li a {
color: white;
text-decoration: none;
}
main {
padding: 20px;
}
.featured-article {
display: flex;
margin-bottom: 20px;
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.featured-article img {
width: 40%;
object-fit: cover;
}
.article-content {
padding: 20px;
}
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.grid-item {
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 10px;
text-align: center;
}
.grid-item img {
width: 100%;
height: 150px;
object-fit: cover;
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px 0;
position: relative;
bottom: 0;
width: 100%;
}