Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600&display=swap" rel="stylesheet">
<header id="header">
   <div>
      <img src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" alt="Logo" id="header-img">

   </div>
   <nav id="nav-bar">
      <a href="#hero" class="nav-link">How it Works</a>
      <a href="#features" class="nav-link">Features</a>
      <a href="#pricing" class="nav-link">Pricing</a>
   </nav>
</header>
<main>

   <section id="hero">
      <div id="hero-email">
         <h1>Handcrafted, home-made masterpieces</h1>
         <form action="https://www.freecodecamp.com/email-submit" id="form">
            <input type="email" name="email" id="email" placeholder="Enter your email address">
            <input type="submit" id="submit" value="Get started" class="button">
         </form>
      </div>

      <div id="hero-video">
         <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/y8Yv4pnO7qc" title="Roman Carnival Overture Op. 9 for Five Trombones" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
      </div>

   </section>

   <section id="features">
      <ul>
         <li class="feature-item">
            <i class="fa fa-fire-flame-curved fa-3x"></i>
            <div>
               <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>
         </li>
         <li class="feature-item">
            <i class="fa-solid fa-truck fa-3x"></i>
            <div>
               <h2>Fast Shipping</h2>
               <p>We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied.</p>
            </div>
         </li>
         <li class="feature-item">
            <i class="fa-solid fa-battery-full fa-3x"></i>
            <div>
               <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>
         </li>
      </ul>
   </section>

   <section id="pricing">
      <div class="card">
         <h2 class="card-title">TENOR TROMBONE</h2>
         <h1 class="card-price">$600</h1>
         <hr />
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-feature">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <button class="button card-button">Select <i class="fa-solid fa-arrow-right"></i></button>
      </div>

      <div class="card">
         <h2 class="card-title">TENOR TROMBONE</h2>
         <h1 class="card-price">$600</h1>
         <hr />
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-feature">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <button class="button card-button">Select <i class="fa-solid fa-arrow-right"></i></button>
      </div>

      <div class="card">
         <h2 class="card-title">TENOR TROMBONE</h2>
         <h1 class="card-price">$600</h1>
         <hr />
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-benefit">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <p class="card-feature">
            <i class="fa-solid fa-circle-check"></i>
            Lorem, ipsum dolor
         </p>
         <button class="button card-button">Select <i class="fa-solid fa-arrow-right"></i></button>
      </div>
   </section>

</main>

<footer id="footer">
   <p>
      Copyright &copy; <script>
         document.write(new Date().getFullYear())
      </script> - All right reserved
   </p>

   <ul>
      <li><a href="#">Privacy</a></li>
      <li><a href="#">Terms</a></li>
      <li><a href="#">Contact</a></li>
   </ul>

</footer>
              
            
!

CSS

              
                :root {
   --primary-color: #f1c40f;
   --gray: #6b7280;
   --gray-dark: #4a5568;
   --gray-light: #dddddd;
   --black: #000;
   --white: #fff;
   --bp-small: 360px;
   --bp-medium: 640px;
   --bp-large: 1024px;
}
html {
   font-size: 62.5%;
   scroll-behavior: smooth;
   scroll-padding: 150px;
}
body,
ul {
   font-size: 1.6rem;
   font-family: "Merriweather", serif;
   padding: 0;
   margin: 0;
   color: var(--gray);
}
#nav-bar {
   font-family: Helvetica, Arial, sans-serif;
   font-weight: bolder;
}
h1,
h2,
h3,
h4,
h6 {
   font-family: Helvetica, Arial, sans-serif;
   font-weight: lighter;
   color: var(--black);
}
#header {
   width: 100%;
   height: 75px;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: space-between;
   background-color: var(--primary-color);
   position: sticky;
   top: 0;
   padding: 1.6rem 0;
   z-index: 1;
}
#header-img {
   width: 300px;
}
#nav-bar {
   width: 50%;
   display: flex;
   align-items: center;
   justify-content: space-evenly;
}
#nav-bar a {
   margin: 0 1.6rem;
   text-decoration: none;
   color: #000;
}
#hero {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   background: radial-gradient(
      circle,
      rgba(119, 111, 92, 1) 0%,
      rgba(238, 229, 211, 1) 100%
   );
}

#hero-email {
   align-self: center;
   text-align: center;
   margin-top: 6rem;
}
#form {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 2.4rem;
}
#form input[type="email"] {
   width: 250px;
   padding: 0.4rem;
   font-size: 1.4rem;
}
#form input[type="submit"] {
}

#form input[type="submit"]:hover,
#form input[type="submit"]:focus {
}

#hero-video {
   width: 100%;
   display: grid;
   grid-template-columns: repeat(16, 1fr);
   grid-template-rows: repeat(9, 1fr);
   position: relative;
   margin: 6rem 0;
   background-color: var(--gray-light);
}

#hero-video::before {
   content: "";
   display: block;
   padding-bottom: 100%;
}
#hero-video > iframe {
   position: absolute;
   width: 100%;
   height: 100%;
}

#features {
   margin: 0 1.6rem;
   text-align: center;
}

#features ul {
   list-style: none;
}
.feature-item {
   margin: 6rem 0;
}
.feature-item > i {
   display: none;
}

#pricing {
   display: flex;
   flex-direction: column;
   gap: 1.6rem;
   margin: 6rem 1.6rem;
}
.card {
   border: 2px solid var(--gray);
   border-radius: 15px;
   padding: 3.2rem;
}
.card-title {
   font-size: 1.4rem;
   margin: 0;
   color: #6b7280;
   margin-bottom: 0.8rem;
}
.card-price {
   font-size: 4rem;
   margin: 0;
   margin-bottom: 0.8rem;
}
.card-benefit {
   color: #6b7280;
   margin: 1.6rem 0;
}

.card-button {
   width: 100%;
   display: flex;
   flex-direction: row;
   justify-content: space-between;
   align-items: center;
}

.button {
   --clr: #5559ab;
   --outline: 2px solid var(--gray-dark);
   outline: var(--outline);
   transition: outline-offset 200ms ease;
   padding: 1.2rem;
   border: 2px solid var(--gray-dark);
   border-radius: 5px;
   cursor: pointer;
   font-weight: 800;
   text-transform: uppercase;
   color: var(--black);
   background-color: var(--primary-color);
}
.button:hover,
.button:focus {
   outline: var(--outline);
   outline-offset: -6px;
}

#footer {
   height: 80px;
   padding: 1.6rem;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   background-color: var(--gray-light);
}

#footer ul {
   list-style: none;
   display: flex;
   gap: 1.6rem;
}

#footer p {
   color: var(--gray-dark);
}

#footer a {
   text-decoration: none;
   color: var(--black);
   font-weight: bold;
}

@media screen and (min-width: 640px) {
   #hero {
      flex-direction: row;
      justify-content: center;
   }
   #hero-video {
      width: 560px;
      margin-left: 3.2rem;
      margin-right: 3.2rem;
   }
   #features {
      width: 640px;
      margin: 0 auto;
      text-align: left;
   }
   .feature-item {
      display: flex;
      align-items: center;
   }
   .feature-item > i {
      margin: 0 1.6rem;
      display: block;
      color: var(--primary-color);
   }
   #pricing {
      flex-direction: row;
      justify-content: center;
   }
   .card {
      width: 31.3rem;
   }
   #footer {
      height: 80px;
      padding: 1.6rem 3.2rem;
      flex-direction: row;
      justify-content: space-between;
   }
}
@media screen and (min-width: 360px) {
   #pricing {
      margin-left: 6rem;
      margin-right: 6rem;
   }
}

              
            
!

JS

              
                
              
            
!
999px

Console