<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Mobile Friendly News</title>
<style>
/* General styles */
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
text-align: center;
padding: 20px;
}
header h1 {
margin: 0;
font-size: 2em;
}
nav {
background-color: #222;
text-align: center;
padding: 10px 0;
}
nav a {
color: #fff;
margin: 0 15px;
text-decoration: none;
font-size: 1.2em;
}
nav a:hover {
text-decoration: underline;
}
/* Main Content */
.main-content {
max-width: 1200px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
}
.news-article {
border-bottom: 1px solid #ccc;
padding: 15px 0;
}
.news-article h2 {
font-size: 1.8em;
margin-bottom: 10px;
}
.news-article p {
font-size: 1.1em;
color: #333;
line-height: 1.5;
}
/* Mobile-friendly styles */
@media (max-width: 768px) {
header h1 {
font-size: 1.5em;
}
nav a {
font-size: 1em;
margin: 0 10px;
}
.news-article h2 {
font-size: 1.5em;
}
.news-article p {
font-size: 1em;
}
}
</style>
</head>
<body>
<header>
<h1>Mobile News</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">World</a>
<a href="#">Technology</a>
<a href="#">Sports</a>
<a href="#">Entertainment</a>
</nav>
<div class="main-content">
<!-- News Articles -->
<div class="news-article">
<h2>Breaking News: Major Event Happening Right Now</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque varius vestibulum turpis, in luctus ipsum. Integer posuere ligula vel bibendum facilisis.</p>
</div>
<div class="news-article">
<h2>Tech Innovation: The Latest Gadgets Revealed</h2>
<p>Vestibulum vel felis eget elit cursus tempor. In ut ante a sapien feugiat mollis. Sed nec posuere leo, ac hendrerit lorem.</p>
</div>
<div class="news-article">
<h2>Sports Update: A Thrilling Game</h2>
<p>Curabitur malesuada leo a tristique volutpat. Nam id sem ut ante tempor eleifend. Integer vehicula dui id suscipit efficitur.</p>
</div>
<div class="news-article">
<h2>Entertainment: Upcoming Movie Releases</h2>
<p>Mauris ac efficitur felis, ut fringilla velit. Vivamus gravida libero id felis gravida, sed euismod ipsum efficitur.</p>
</div>
</div>
</body>
</html>
Comments
Post a Comment