Tell us what’s happening:
Good day everyone! i need your help to fix it: 9. Each .nav-link element should have an href attribute.
Waiting:10. Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element’s id. e.g. #footer).
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css"/>
<title>Product Landing Page</title>
</head>
<body>
<header id="header">
<img id="header-img" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" alt="logo"/>
<nav id="nav-bar">
<ul>
<li class="nav-link"><a href="#features">Features</a></li>
<li class="nav-link"><a href="#video">How It Works</a></li>
<li class="nav-link"><a href="#pricing">Pricing</a></li>
</ul>
</nav>
</header>
<main>
<section class="email">
<h2>Handcrafted, home-made masterpieces</h2>
<form id="form" action="https://www.freecodecamp.org/email-submit" method="POST">
<input type="email" id="email"
name="email"
placeholder="Enter your email address"/>
<input type="submit" id="submit" value="GET STARTED"/>
</form>
</section>
<section id="features">
<div class="feature-1">
<h2>Premium Materials</h2>
<p>Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
</div>
<div class="feature-2">
<h2>Fast Shipping</h2>
<p>We make sure you receive your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied.</p>
</div>
<div class="feature-3">
<h2>Quality Assurance</h2>
<p>For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument.</p>
</div>
</section>
<section class="video-container">
<iframe id="video" src="https://www.youtube.com/embed/y8Yv4pnO7qc"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
</section>
<section id="pricing">
<div class="card">
<h3 class="card-head">Tenor Trombone</h3>
<p class="price">$600</p>
<p class="description">
Good for beginners<br/>
Excellent sound quality<br/>
Great for Jazz Bands<br/>
Nice and shiny<br/>
</p>
<button class="card-btn">Select</button>
</div>
<div class="card">
<h3 class="card-head">Bass Trombone</h3>
<p class="price">$900</p>
<p class="description">
Sound quality is unmatched<br/>
Best for professionals<br/>
Absolutely stunning<br/>
Durable and long lasting<br/>
</p>
<button class="card-btn">Select</button>
</div>
<div class="card">
<h3 class="card-head">Valve Trombone</h3>
<p class="price">$1200</p>
<p class="description">
Plays similar to a Trumpet<br/>
Great for Jazz Bands<br/>
Beautiful in sound and appearance<br/>
Just amazing<br/>
</p>
<button class="card-btn">Select</button>
</div>
</section>
</main>
<footer>
<nav id="foot-bar">
<ul>
<li class="foot-link"><a href="#">Privacy</a></li>
<li class="foot-link"><a href="#">Terms</a></li>
<li class="foot-link"><a href="#">Contact</a></li>
</ul>
</nav>
<p class="foot-rights">Copyright 2016, Original Trombones</p>
</footer>
</body>
</html>
/* file: styles.css */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
font-family: sans-serif;
background-color: #e0e0e0;
}
#header {
position: sticky;
top: 0;
display: flex;
justify-content: space-between;
background-color: #e0e0e0;
}
#nav-bar ul, #foot-bar ul {
display: flex;
gap: 30px;
margin: 20px;
list-style: none;
font-size: 1.1rem
}
a {
text-decoration: none;
color: #000;
}
#header-img {
width: 330px;
}
main {
margin-top: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
}
.email h2 {
text-align: center;
}
#form {
display: flex;
flex-direction: column;
max-width: 200px;
align-items: center;
justify-content: center;
margin: 10px 0 0 120px;
}
#email {
background-color: white;
height: 30px;
width: 200px;
border-radius: 5px;
margin-bottom: 10px;
border: 1px solid black;
}
#email::placeholder {
text-align: center;
}
#submit {
background-color: #ffaf69;
height: 30px;
border-radius: 10px;
font-weight: bold;
padding: 5px;
border-color: #e0e0e0;
transition: #ff8a24 0.3s ease;
}
#submit:hover {
background-color: #ff8a24;
}
#features {
margin-top: 50px;
display: grid;
gap: 20px;
padding-left: 20px;
}
#features h2 {
margin-bottom: 10px;
}
#features p {
font-size: 18px;
}
.feature-1::before {
content: '🔥';
font-size: 50px;
float: left;
}
.feature-2::before {
content: '🚚';
font-size: 50px;
float: left;
}
.feature-3::before {
content: '💡';
font-size: 50px;
float: left;
}
.video-container {
margin-top: 60px;
}
#video {
width: 600px;
height: 400px;
}
#pricing {
margin-top: 60px;
display: flex;
justify-content: space-between;
gap: 40px;
}
.card {
background-color: whitesmoke;
text-align: center;
border: 1px solid black;
width: 260px;
height: 240px;
margin-bottom: 50px;
border-radius: 5px;
}
.card-head {
margin-bottom: 20px;
padding: 5px;
font-size: 20px;
background-color: #999;
}
.price {
font-weight: bold;
font-size: 20px;
margin-bottom: 10px;
background-color: whitesmoke;
}
.description {
background-color: whitesmoke;
margin-bottom: 20px;
}
.card-btn {
background-color: #ffaf69;
height: 30px;
border-radius: 10px;
font-weight: bold;
padding: 5px;
border-color: #e0e0e0;
width: 100px;
font-size: 18px;
transition: #ff8a24 0.3s ease;
}
.card-btn:hover {
background-color: #ff8a24;
}
footer {
background-color: whitesmoke;
display: flex;
flex-direction: column;
align-items: flex-end;
padding-right: 10px;
padding-bottom: 10px;
}
@media only screen and (max-width: 500px) {
#pricing {
margin-top: 60px;
display: flex;
flex-direction: column;
gap: 40px;
}
#video {
width: 400px;
height: 250px;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 YaBrowser/26.4.0.0 Safari/537.36
Challenge Information:
Build a Product Landing Page - Build a Product Landing Page

