Project: Product Landing Page
Let's build a full, responsive shop page with a navbar, a hero, product cards, a features row, an FAQ accordion and a footer - all with Bootstrap classes.
This project combines the whole course into a page you could actually launch for a small business: navigation, a hero section, product cards, a feature row, an FAQ and a footer. Read through it section by section, notice which Bootstrap classes each part uses, then change the content and colours to make it your own.
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="">
<nav class="navbar navbar-expand-md bg-dark sticky-top" data-bs-theme="dark">
<div class="container">
<a class="navbar-brand fw-bold" href="#">🎧 SoundBox</a>
<button class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#nav" aria-label="Menu"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="nav">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link" href="#products">Products</a></li>
<li class="nav-item"><a class="nav-link" href="#faq">FAQ</a></li>
</ul>
</div>
</div>
</nav>
<header class="py-5 text-center bg-primary-subtle">
<div class="container">
<h1 class="display-5 fw-bold">Sound that moves you</h1>
<p class="lead">Earbuds and speakers with up to 40 hours of battery.</p>
<a href="#products" class="btn btn-primary btn-lg rounded-pill px-4">Shop now</a>
</div>
</header>
<section id="products" class="container py-5">
<h2 class="mb-4">Best sellers</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-lg-3 g-4">
<div class="col"><div class="card h-100 shadow-sm">
<div class="card-body"><h5 class="card-title">Buds Pro</h5><p class="text-body-secondary">ANC, 30h battery</p>
<p class="fs-5 fw-bold">₹2,499 <small class="text-decoration-line-through text-body-secondary fs-6">₹4,999</small></p>
<a href="#" class="btn btn-outline-primary w-100">Buy now</a></div></div></div>
<div class="col"><div class="card h-100 shadow-sm">
<div class="card-body"><h5 class="card-title">Mini Speaker</h5><p class="text-body-secondary">Waterproof, 12h</p>
<p class="fs-5 fw-bold">₹1,299</p>
<a href="#" class="btn btn-outline-primary w-100">Buy now</a></div></div></div>
<div class="col"><div class="card h-100 shadow-sm">
<div class="card-body"><h5 class="card-title">Party Box</h5><p class="text-body-secondary">40W, lights</p>
<p class="fs-5 fw-bold">₹5,999</p>
<a href="#" class="btn btn-outline-primary w-100">Buy now</a></div></div></div>
</div>
</section>
<section class="bg-body-tertiary py-4">
<div class="container text-center">
<div class="row g-3">
<div class="col-md-4">🚚 <b>Free delivery</b> over ₹499</div>
<div class="col-md-4">↩️ <b>7-day</b> easy returns</div>
<div class="col-md-4">🛡️ <b>1-year</b> warranty</div>
</div>
</div>
</section>
<section id="faq" class="container py-5" style="max-width: 720px">
<h2 class="mb-3">FAQ</h2>
<div class="accordion" id="faqs">
<div class="accordion-item">
<h3 class="accordion-header"><button class="accordion-button" data-bs-toggle="collapse" data-bs-target="#q1">How long is delivery?</button></h3>
<div id="q1" class="accordion-collapse collapse show" data-bs-parent="#faqs"><div class="accordion-body">2-4 days in metro cities, up to 7 days elsewhere.</div></div>
</div>
<div class="accordion-item">
<h3 class="accordion-header"><button class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#q2">Can I pay cash on delivery?</button></h3>
<div id="q2" class="accordion-collapse collapse" data-bs-parent="#faqs"><div class="accordion-body">Yes, for orders up to ₹10,000.</div></div>
</div>
</div>
</section>
<footer class="py-4 bg-dark text-white-50 text-center">© 2026 SoundBox</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>▶ Try it yourselfChallenges
- Add a dark-mode switch with
data-bs-theme. - Add a modal that opens when you press Buy now.
- Change the brand colour with CSS variables.
- Add a toast that says "Added to cart".
📝 Test yourself
1. Which navbar class collapses the menu below the md breakpoint?
2. What does row-cols-lg-3 do?
3. Fill in the class that makes all cards in a row the same height:
<div class="card ">
