Awesome! Time to put everything into action with a real-world project. Letโs jump into:
๐ LESSON 10: Project โ Build a Responsive Landing Page
โ Learning Goals:
- Combine HTML, CSS, Flexbox, and Media Queries
- Build a real responsive landing page
- Understand project structure and best practices
- Apply visual hierarchy, spacing, and alignment techniques
๐งพ Lesson Content (Text for Website)
๐ ๏ธ Project Overview
You’re going to build a simple, modern responsive landing page with:
- A fixed navbar
- A hero section
- Feature cards
- A call-to-action section
- A responsive footer
Perfect for practicing real frontend workflow!
๐งฑ File Structure
/landing-page
โโโ index.html
โโโ style.css
๐ป HTML Code (index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Landing Page</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header class="navbar">
<h1>BrandName</h1>
<nav>
<a href="#">Home</a>
<a href="#">Features</a>
<a href="#">Contact</a>
</nav>
</header>
<section class="hero">
<h2>Grow Your Business with Us</h2>
<p>We create beautiful and responsive websites for everyone.</p>
<a href="#" class="btn">Get Started</a>
</section>
<section class="features">
<div class="card">๐ Fast Performance</div>
<div class="card">๐ฑ Mobile Friendly</div>
<div class="card">๐ Secure & Reliable</div>
</section>
<section class="cta">
<h2>Ready to launch?</h2>
<a href="#" class="btn">Contact Us</a>
</section>
<footer>
<p>ยฉ 2025 BrandName. All rights reserved.</p>
</footer>
</body>
</html>
๐จ CSS Code (style.css)
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: sans-serif;
}
body {
line-height: 1.6;
background: #f9f9f9;
}
.navbar {
background: #333;
color: white;
padding: 15px 30px;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
width: 100%;
top: 0;
}
.navbar nav a {
color: white;
margin-left: 20px;
text-decoration: none;
}
.hero {
padding: 120px 30px 60px;
text-align: center;
background: #ff6f00;
color: white;
}
.btn {
display: inline-block;
background: #fff;
color: #ff6f00;
padding: 10px 20px;
margin-top: 20px;
text-decoration: none;
font-weight: bold;
border-radius: 4px;
}
.features {
display: flex;
gap: 20px;
padding: 40px 30px;
justify-content: center;
flex-wrap: wrap;
background: white;
}
.card {
background: #ffe0b2;
padding: 30px;
border-radius: 8px;
min-width: 250px;
flex: 1;
text-align: center;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.cta {
padding: 60px 30px;
background: #ff6f00;
color: white;
text-align: center;
}
footer {
text-align: center;
padding: 20px;
background: #333;
color: white;
}
@media (max-width: 768px) {
.features {
flex-direction: column;
}
.navbar {
flex-direction: column;
align-items: flex-start;
}
.navbar nav {
margin-top: 10px;
}
}
๐ธ Final Result
Youโll have a beautiful landing page that looks like this:
- Navbar at the top (sticky)
- Bold hero section
- Three clean feature cards
- Call-to-action with button
- Footer at the bottom
โ All fully responsive!
๐ช Practice Task
- Customize the page with your own branding
- Replace icons with images or SVGs
- Add more sections (testimonials, pricing, etc.)
- Push it to GitHub and share it!
๐ Quick Summary
- You built a real-world project using everything youโve learned
- This is how professional landing pages are made
- Keep practicing and tweaking it for mastery
๐ Next Lesson:
๐ Lesson 11: Introduction to CSS Grid
21
One Response