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

              
                <main>
  <header id="header">
  <img id="header-img" src="https://i.imgur.com/Hf7sSE7.png" alt="crinkle monster logo">
    <nav id="nav-bar">
      <ul>
        <li><a href="#shop" class="nav-link">shop</a></li>
        <li><a href="#action" class="nav-link">crinkle monster in action</a></li>
        <li><a href="#about-us" class="nav-link">why it works</a></li></ul>
    </nav>
  </header>
    
    <article id="about">
      <h1>Crinkle Monster: the World's Best Cat Toy!</h1>
      <h2> Stop buying expensive toys your cat loses or gets bored with after one day.</h2> 
      <h2>Switch to a fun, recyclable, CRINKLY solution that will have them coming back again and again.</h2>
      <img class="product-img" src="https://i.imgur.com/E6GfTBt.jpg" alt="pale-skinned hands lifting a crinkly piece of brown paper from a box">
  </article> 
    <h3>Shop</h3>
  <div id="shop" class="products">
    <div id="shopbox1" class="shopbox">
     <h3 class="productname">Crinkle Starter Kit</h3>
      <p class="price">$10</p>
      <p>3 Crinkle Monsters: A perfect starter kit for your cat's next adventure.</p>
      <button class="buy">Buy</button>
      <p><button class="learn">Learn More</button></p>
    </div>
  <div id="shopbox2" class="shopbox">
    <h3 class="productname">Multi-Cat Crinkles</h3>
    <p class="price">$30</p>
    <p>10 Crinkle Monsters: Buy in bulk for many paws & a happy cat family!</p>
    <button class="buy">Buy</button>
    <p><button class="learn">Learn More</button></p>
    </div>
  <div id="shopbox3" class="shopbox">
    <h3 class="productname">Crinkles Forever</h3>
    <p class="price">Starting at $8/Month</p>
    <p>3 fresh Crinkle Monsters delivered to your doorstep every month.</p>
    <p><button class="buy">Sign Up</button></p>
    <p><button class="learn">Learn More</button></p>
    </div>
  </div>
  <h3>Crinkle Monster in action!</h3>
   <div id="action">  
 <iframe width="420" height="315" id="video"
src="https://www.youtube.com/embed/VK7rOnbcDws">
</iframe>
  </div>
  
  <div id="about-us">
    <h3>Why It Works</h3>
 <p>"Your cat has absolutely amazing hearing and can actually hear at the ultrasonic level. While cats don’t use this superhuman level of hearing to communicate with each other, mice certainly do! The noise that crinkling up that piece of paper makes could not only mimic the ultrasonic communication of mice but it could also sound similar to the movement of mice and other small animals in the bushes and leaves." </p>
   <p><a href="https://betterwithcats.net/why-do-cats-like-crinkly-things/"> - <em>Better With Cats</em> Blog</a> </p>
    <img class="product-img" src="https://i.imgur.com/wsSQMka.png" alt="long piece of brown crinkled paper">
    </div> 
  </main>
<footer>  
<div id="newsletter">
  <h2>Get your paws on our newsletter for a meowtastic discount!</h2>
<form id="form" action="https://www.freecodecamp.org/email-submit">
  <label for="email">Your Email:</label>
    <input id="email" type="email" placeholder="crinkle@crinklecats.com" name="email" class="learn" required>
  <button id="submit" type="submit" class="learn">Sign me up</button>
  </form></div>
<p>Copyright 2022 - Crinkle Monster LLC</p>
</footer>
              
            
!

CSS

              
                main {
  text-align: center; 
  padding: 8vmax;
  background-image: url("https://www.transparenttextures.com/patterns/exclusive-paper.png");
}

main, footer, nav {
   font-family: helvetica, sans-serif;
}

h1, h3, .price {
  font-family: "caveat brush", handwriting;
}

h1 {
  font-size: 45px;
}

h2 {
 font-size: 22px;  
}

h3 {
  font-size: 35px;
  text-transform: uppercase;
}

#header-img {
  position: relative;
  width: 100px;
  max-width: 50%;
  border-radius: 50px;
}

.product-img {
  width: 400px;
  border-radius: 10px;
  max-width: 60%;
  height: auto;
  padding: 5px;
}

#header {
  padding: 10px;
  position: fixed;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  width: 100%;
  top: 0;
  left: 0;
  background-color: #6E4139;
}

#nav-bar {
  padding-top: 10px;
  margin: 1vw;
}

nav li {
 display: inline; 
}

.nav-link {
  padding: 10px;
  text-transform: uppercase;
  color: white;
}

a:hover {
  color: #5271FF;
  font-weight: 600;
}

#about {
  margin-top: 15vh;
}

#shop {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
}

.shopbox {
  width: 300px;
  height: auto;
  border-radius: 5px;
  background-color: #FFFAEB;
  padding: 10px;
}

.productname {
  font-size: 20px;
  font-style: italic;
}

.price {
  font-size: 18px;
}

.buy, #submit {
 border-radius: 7px;
 border: 1px solid;
 background: #5271FF;
 color: white;
 text-transform: uppercase;
 font-weight: 900;
 padding: 5px;
}

.learn {
  border: 2px solid;
  color: #5271ff;
  font-weight: 800;
  border-radius: 5px;
  padding: 5px;
}

#about-us {
  background-color: #FFFAEB;
  padding: 2px 40px;
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
  border-radius: 10px;
}

form {
  text-align: center;
  padding: 10px;
  max-width: 100%;
  margin: auto;
}

#newsletter {
  display: flex;
  align-items: center;
  background-color: #FFFAEB;
  padding: 20px;
  margin: auto;
  border-radius: 5px;
  max-width: 800px;
}

#submit {
  margin-top: 10px;
}

footer {
  text-align: center;
  padding: 30px;
  background: #6E4139;
}

footer p {
  color: white;
}

@media screen and(max-width: 767px) {
  
  main {
    padding: 20vmax 10vmin;
  }
  iframe {
    width: 80%;
  } 
  #header, #newsletter {
    flex-direction: column;
    align-items: center;
  } 
  #nav-bar {
    padding-right: 10vw;
}  
}

@media (max-width: 625px) {
  #header {
    padding-bottom: 0px;
  }
  
  #about {
  margin-top: 25vh;
}
  
  h1 {
    font-size: 30px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  h3 {
    font-size: 25px;
  }
}
              
            
!

JS

              
                // !! IMPORTANT README:

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

/***********
INSTRUCTIONS:
  - Select the project you would 
    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