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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Landing Page</title>
    <link rel="stylesheet" href="style.css">
    <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
    <script src="https://kit.fontawesome.com/1f5460a8a6.js"></script>
  </head>
  <body>
    <header id='header'>
      <div id="logo">
        <img src="https://i.imgur.com/ZKlLIVN.jpg" id='header-img'>
      </div>
      <nav id='nav-bar'>
        <a href="#product-details" class="nav-link">Product Details</a>
        <a href="#video-description" class="nav-link">Video Preview</a>
        <a href="#prices" class="nav-link">Prices</a>
        <a href="#contact" class="nav-link">Contact Us</a>
      </nav>
    </header>
    <div id="container">
      <section id="product-details">
        <h1>Homewoven Handycrafts</h1>
        <div id="products-offered">
          <div class="offered">
            <div class="offered-icon">
              <i class="fas fa-2x fa-hamburger"></i>
            </div>
            <div class="offered-description">
              <h2>Delicious Food</h2>
              <p>Mmm...burgers. And other things.</p>
            </div>
          </div>
          <div class="offered">
            <div class="offered-icon">
              <i class="fas fa-2x fa-atom"></i>
            </div>
            <div class="offered-description">
              <h2>Atomically Cooked to Perfection</h2>
              <p>We use special microwaves to ensure the best quality of our products.</p>
            </div>
          </div>
          <div class="offered">
            <div class="offered-icon">
              <i class="fas fa-2x fa-coffee"></i>
            </div>
            <div class="offered-description">
              <h2>We Have The Java</h2>
              <p>The drink, not the language.</p>
            </div>
          </div>
        </div>
        <form id="form" action="https://www.freecodecamp.com/email-submit">
          <input name="email" type="email" id="email" placeholder="Enter your email address">
          <input class="button" type="submit" id="submit" value="Sign up for our mailing list">
        </form>
      </section>
      <section id="video-description">
        <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/n86gOQhrGtA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
      </section>
      <section id="prices">
        <div class="product">
          <h3>Burger</h3>
          <p>$12</p>
          <ul>
            <li>Good Fiber</li>
            <li>Melted Cheese</li>
            <li>Toasted Bun</li>
          </ul>
          <button class="button">BUY</button>
        </div>
        <div class="product">
          <h3>Fries</h3>
          <p>$4</p>
          <ul>
            <li>Air Fried</li>
            <li>Toppings</li>
            <li>Small or Large</li>
          </ul>
          <button class="button">BUY</button>
        </div>
        <div class="product">
          <h3>Coffee</h3>
          <p>$5</p>
          <ul>
            <li>Freshly Roasted</li>
            <li>Chocolate Included</li>
            <li>Hot, Cold, Blended</li>
          </ul>
          <button class="button">BUY</button>
        </div>
      </section>
      <footer id="contact">
        <a href="">Outreach</a>
        <a href="">About</a>
        <a href="">Careers</a>
        <p>&copy Homewoven Handycrafts 2019</p>
      </footer>
    </div>
  </body>
</html>
              
            
!

CSS

              
                * {
	margin: 0;
	padding: 0;
	font-family: Roboto, sans-serif;
}

:root {
	--gray: #D4D5D6;
	--white: #fff;
	--black: #000;
	--blue: #1D69D4;
}

body {
	padding-top: 50px;
}

#product-details, #video-description {
	text-align: center;
}

li {
	list-style: none;
}

.button {
	background: var(--blue);
	color: var(--white);
	padding: 15px 15px;
	border: 2px solid var(--black);
	cursor: pointer;
}

#email {
	padding: 15px 15px;
}

/* HEADER */
header {
	background: var(--gray);
	position: fixed;
	top: 0;
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

header a {
	color: var(--white);
	padding: 14px 20px;
	text-decoration: none;
	text-align: center;
	text-transform: uppercase;
}

header a:hover {
	color: var(--blue);
	background: var(--black);
}

/* CONTAINER */
#container {
	max-width: 1000px;
	width: 100%;
	margin: 0 auto;
}

/* PRODUCT DETAILS */
#product-details > h1, h2, form, input, .offered {
	margin-top: 20px;
}

/* VIDEO DESCRIPTION */
#video {
	margin-top: 30px;
}

#video-description {
	height: 450px;
}

/* PRICES */
#prices {
	margin-top: 30px;
	display: flex;
	justify-content: center;
	flex-direction: row;
}

.product {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: calc(100% / 3);
	margin: 15px;
	border: 1px solid var(--black);
}

#prices > .product, h3, p, li, button {
	margin-bottom: 15px;
}

.product h3 {
	background: var(--gray);
	width: 100%;
}

/* FOOTER */

footer {
	background: var(--gray);
	color: var(--white);
}

footer a, footer p {
	display: flex;
	justify-content: space-around;
}

footer a {
	color: var(--white);
	padding: 14px 20px;
	text-decoration: none;
	text-align: center;
	text-transform: uppercase;
}

footer a:hover {
	color: var(--blue);
	background: var(--black);
}
              
            
!

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