Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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

Save Automatically?

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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<head>
  <title>Build a Landing page - freecodecamp</title>
</head>

<body>
  <header id="header">
  <img src="https://image.shutterstock.com/image-vector/abstract-triathlon-events-260nw-233967895.jpg" alt="original triathlon logo" id="header-img">
    <nav id="nav-bar">
      <a href="#features" class="nav-link">Features</a>
      <a href="#video" class="nav-link">Must Have Gear</a>
      <a href="#products" class="nav-link">Pricing</a>
    </nav>
  </header>
  
  <main>
    <article id="intro">
      <h2>Handcrafted, made in the USA, prime products!</h2>
      <form id="form" action="https://www.freecodecamp.com/email-submit"> 
        <input type="email" name="email" placeholder="enter your email" id="email" required></input>
<input type="submit" id="submit" value="Get Started" class="btn">  
      </form>
    </article>

<article id="features">
   <section class="feature-section">
  <img src="https://cdn11.bigcommerce.com/s-c0cjv/images/stencil/350x350/products/37437/56953/back__23087.1582225333.jpg?c=2" class="feature-img">
   <div> 
   <h2>Premium Materials</h2>
  <p>Our made in the USA, premium products provide the latest in mosture wicking and areo capabilities.</p>
     </div>  
  </section>
 
<section class="feature-section">
    <img src="https://www.freeiconspng.com/uploads/red-banner-free-shipping-hd-1.png" class="feature-img">
                                                                                                         
 <div>
  <h2>Free Shipping</2>
 <p>To reduce cost, we provide free shipping to any order being delievered in the Continential United States.</p>
  </div> 
  </section>
  </articles> 
  
<iframe width="500" height="300" src="https://m.youtube.com/watch?v=lewr3OJ9n0c" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" id="video" allowfullscreen></iframe>

<article id="products">
  <section class="product-section">
  <div clss="product-header"> 
    <h2>Tri-kit</h2>
    </div>
    <div class="product-content">
    <p class="product-price">$399</p>
  <ol class="product-desc">
    <li>Red</li>
    <li>Black</li>
    <li>Blue</li>
      </ol>
      </div>
    <button class="btn">select</button>
  </section>
  </articles>
  
  </main>

<footer>
  <nav-id="footer-nav">
    <a href="" class="nav-link">Privacy</a>
    <a href="" class="nav-link">Terms</a>
    <a href="" class="nav-link">Contact</a>
    </nav>
</footer>
</body>
    
          
    
  
  
      
    
    
                         
                          
                          
                                                   
                          
                          
                          
                          

                                                                                                                                                 
                                                                                                                                                 
                                                               
                                                                
    
              
            
!

CSS

              
                body {
  background-color: rgb(128,128,128);
  display: flex;
  flex-direction: column;
  font-family: Helvetica, sans-serif;
}

header {
  position: fixed;
  width: 100%;
  background-color: rgb(130,130,130);
  display: grid;
  grid-template-columns: 300px 1fr;
  z-index: 1;
  top: 0;
  left: 0;
  padding-top: 5px;
}

main {
  display: flex;
  flex-direction: column;
  margin: auto;
  max-width: 725px;
  position: relative;
  top: 40px;
  z-index: 0;
}

#header-img {
  grid-column: 4;
  width: 100%;
  align-self: center;
}

#nav-bar {
  grid-colum: 2;
  align-self: center;
  justify-content: center;
  display: block;
  margin-right: 5px;
}

.nav-link {
  text-decloration: inherit;
  color: inherit;
  margin: 5px;
}

#intro {
  display: flex;
  flex-direction: column;
  align-itmes: center;
}

#intro h2 {
  margin-bottom: 15px;
}

#form {
  display: grid;
  grid-template-rows: 1fr, 1fr;
  grid-gap: 10px;
}

#features {
  margin-top: 20px;
    display: flex;
  flex-direction: coulmn;
  }

.feature-section {
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
}

.feature-img {
  width: 50%;
  justify-self: center;
  align-self: start;
  margin-top: 25px;
}

#video {
  margin: auto;
  max-width: 100%;
  margin-top: 20px;
  margin-bottom: 10px;
}

#products {
  display: grid;
  display-grid-columns: 1fr 1fr 1fr;
  grid-gap: 10px;
  margin-top: 20px;
}

.products-section {
  display: flex;
  flex-direction: column;
  align-itmes: center;
  border-style: groove;
  border-color: lightgray;
  border-width: 1px;
  padding-bottom: 10px;
}

.product-header {
  margin-bottom: -20px;
}

.product-price {
  font-size: 130%;
  font-weight: bold;
  text-align: center;
}

.product-desc {
  life-style: none;
}

footer {
  background-color: rgb(128,128,128);
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-itmes: flex-end;
  padding: 10px;
  padding-bottom: 0px;
}

#footer-nav {
  display: flex;
  grid-gap: 10px;
}

footer p {
  font-size: 80%;
  color: gray;
  margin-bottom: 10px;
}

.btn {
  text-tranform: uppercase;
  background-color: rgb (100,100,100);
  font-weight: bold;
  border-radius: 6px;
  height: 20px;
}

.btnhover {
  transform: scale(1.05);
  animation-name: background-color;
  animation-duration: 150ms;
  anitmation-fill-mode: forwards;
}

@keyframes background- color {
  100%{
    background-color: rgb(128,128,128);
  }
}

@medaia(max-width: 590px) {
  body {
    font-size: 85%;
  }
  header {
    grid-template-columns: 255px 1fr;
  }
  main {
    top: 55px;
  }
  #nav-bar {
    flex-direction: column;
  }
  
  .feature-section {
    display: flex;
    flex-direction: column;
    align-itmes: center;
    text-align: center;
  }
  .feature-img {
    display: none;
  }
  
  #products {
    display: flex;
    flex-direction: column;
    margin: auto;
  }
  .product-section: {
    margin-top: 10px;
  }
  
  footer {
    margin-top: 65px;
  }
}

@media(max-width: 450px;) {
  body {
    font-size= 75%;
  }
  header {
    grid-template-columns: 210px 1fr;
  }
}


              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external atresource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you gwould 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console