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>

<body>
<header id = "header">
  <div class = "flex-container">
    <img id = "header-img" src = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSPTjhaySh8bDqFRoVBsa9C1D592ss5iY0SqnzLh_embaEblbcc" alt = "apple's logo">
    <nav id = "nav-bar">
      <ul>
        <li><a class = "nav-link" href = "#features">Features</a></li>
        <li><a class = "nav-link" href = "#products">Products</a></li>
        <li><a class = "nav-link" href = "#carriers">Carriers</a></li>
        <li><a class = "nav-link" href = "#contact">Contact</a></li>
      </ul>
    </nav>
  </div>
</header>

<div id = "image-container">
  <h1 id = "hero">iPhone X, iPhone Xr, iPhone Xs</h1>
  <p id = "hero2">Which One Is Right For You?</p>
</div>

<!-- Features Section -->
<section id = "features">
  <div id = "video-src">
    <iframe id = "video" src = "https://www.youtube.com/embed/9m_K2Yg7wGQ" allowfullscreen></iframe>
  </div>
</section>

<!-- Products Section -->
<h2>Quick Look</h2>
  <hr>
<section id = "products">
  <div id = "wrapper">
    <div id = "iphone-x">
        <img id = "img-1" src = "https://pisces.bbystatic.com/image2/BestBuy_US/images/products/6009/6009686_sd.jpg;maxHeight=200;maxWidth=300" alt = "iphone x">
        <ul>
          <li id = "list-header"><mark>iPhone X</mark></li>
          <li id = "list-bold">5.8"</li>
          <li id = "list-captions">Super Retina HD Display</li>
          <li id = "list-captions">Dual</li>
          <li id = "list-bold">12 MP</li>
          <li id = "list-captions">wide angle and</li>
          <li id = "list-captions">telephoto cameras</li>
          <li id = "list-bold">7 MP</li>
          <li id = "list-captions">TrueDepth camera</li>
        </ul>
  </div>
    <div id = "iphone-xs">
          <img id = "img-2" src = "https://ss7.vzw.com/is/image/VerizonWireless/apple-iphonexs-silver?$png8alpha256$&hei=410" alt = "iphone-xs">
          <ul>
            <li id = "list-header"><mark>iPhone Xs</mark></li>
            <li id = "list-bold">5.8"</li>
            <li id = "list-captions">Super Retina HD Display</li>
            <li id = "list-captions">Dual</li>
            <li id = "list-bold">12 MP</li>
            <li id = "list-captions">wide angle and</li>
            <li id = "list-captions">telephoto cameras</li>
            <li id = "list-bold">7 MP</li>
            <li id = "list-captions">TrueDepth Camera</li>
          </ul>
        </div>
    <div id = "iphone-xr">
          <img id = "img-3" src = "https://www.sprint.com/content/dam/sprint/commerce/devices/apple/iphone_xr/blue/devicenb_650x900.png/jcr:content/renditions/cq5dam.thumbnail.290.370.png" alt = "iphone-xr">
          <ul>
            <li id = "list-header"><mark>iPhone Xr</mark></li>
            <li id = "list-bold">6.1"</li>
            <li id = "list-captions">Liquid Retina HD Display</li>
            <li id = "list-bold">12 MP</li>
            <li id = "list-captions">camera</li>
            <li id = "list-bold">7 MP</li>
            <li id = "list-captions">TrueDepth camera</li>
          </ul>
        </div>
  </div>
</section>

<!-- Carriers Section -->
<h2>Carriers</h2>
    <hr>
<section id = "carriers">
  <div id = "wrapper-2">
      <img id = "carrier1" src = "https://pmcdeadline2.files.wordpress.com/2017/01/att-logo-featured.jpg?w=446&h=299&crop=1" alt = "att logo">
      <img id = "carrier2" src = "https://images.techhive.com/images/article/2014/08/sprint-logo-100409095-primary.idge.jpg" alt = "sprint logo">
      <img id = "carrier3" src = "https://pmcvariety.files.wordpress.com/2016/04/t-mobile-logo-e1459874139613.jpg?w=1000&h=563&crop=1" alt = "tmobile logo">
      <img id = "carrier4" src = "https://pentagram-production.imgix.net/ba1eda20-927e-47ad-882b-037993fb348a/mb_verizon_01.jpg?rect=337%2C0%2C3834%2C2400&w=880&fit=crop&fm=jpg&q=70&auto=format&h=548" alt = "verizon logo">
  </div>
  </section>

<!-- Contact Section -->
<h3>For more information, enter your email address below and subscribe!</h3>
    <hr>
<section id = "contact">
    <form id = "form" action="https://www.freecodecamp.com/email-submit">
      <input id = "email" type = "email" name = "email" placeholder = " Please enter your email address here..." target = "_blank" >
      <input id = "submit" type = "submit" value = "Send Request"></input>
  </form>
  </section>
  
<!-- Footer Section -->
  <footer>
    <div id = "wrapper-3">
      <p id = "landed">This is not a working site</p>
      <p id = "landed">Made you look</p>
      <p id = "landed">Created for: Free Code Camp</p>
      <p id = "lander">Created by: Blaine West</p>
    </div>
    </footer>
  </body>

              
            
!

CSS

              
                body {
  box-sizing: border-box;
  font-family: arial, helvetica, sans-serif;
  color: #333;
  background: #ccc;
  margin: 0;
}

.flex-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  background: black;
  height: 75px;
  padding: 0 20px;
  margin: 0 px;
  top: 0;
  left: 0;
  }

#header-img {
  width: 40px;
}

.flex-container ul {
  display: flex;
}

#nav-bar a {
  display: block;
  padding: .8rem;
}

header {
  background: black;
  height: 75px;
  padding: 0 20px;
}

li {
  list-style: none;
  padding: 0 1.3rem;
}

a {
  text-decoration: none;
  color: white;
  margin: 0 25px;
  display: block;
  width: 60px;
  text-align: center;
}

#image-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: url(https://ichef.bbci.co.uk/news/660/cpsprodpb/E569/production/_105392785_hi051984792-1.jpg);
  background-size: cover;
  background-position: center;
  width: 100vw;
  height: 100vh;
  background-repeat: no-repeat;
}

#hero, #hero2 {
  margin-left: 5rem;
  color: black;
  font-weight: bold;
}

#hero {
  margin-bottom: 0;
  font-size: 2.3rem;
}

#hero2 {
  margin-top: .5rem;
  font-size: 4rem;
}

#image {
  width: 100%;
  height: 100vh;
}



/* Features Section */
#features {
  display: flex;
  justify-content: center;
  align-items: center; 
  height: 400px;
  width: auto;
}

#features #video-src {
  display: flex;
  margin-top: 30px;
}

#video {
  width: 450px;
  height: 300px;
  box-shadow: 0 1px 5px rgba(104, 104, 104, 0.8);
}

/* Products Section */
#products {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

#wrapper {
  display: flex;
  width: 75%;
  justify-content: space-around;
  margin-bottom: 30px;
}

#products h2 {
  font-size: 2rem;
}

hr {
  width: 75%;
}

h2 {
  font-size: 2rem;
  margin-left: 13%;
}

/* iPhone Images and Info List*/
#img-1, #img-2, #img-3 {
  height: 250px;
  width: auto;
}

#iphone-x, #iphone-xs, #iphone-xr {
  text-align: center;
  padding: 15px 10px;
  background-color: #ddd;
  font-weight: bold;
  box-shadow: 0 1px 5px rgba(104, 104, 104, 0.8);
}

#wrapper ul {
  padding: 0 15px;
}

#list-header {
  font-size: 2rem;
  margin-bottom: 10px;
  
}

#wrapper li {
  padding: 10px;
  width: 100%;
}

#wrapper #list-captions {
  padding: 0;
  font-size: 18px;
  margin: 10px;
  padding-top: 10px;
}

#wrapper #list-bold {
  font-size: 2.7rem;
}

mark {
  background: #333;
  color: white;
  padding: .6rem;
}

/* Carriers Section */
#carriers {
  display: flex;
  justify-content: center;
  align-items: center;
}

#wrapper-2 {
  display: flex;
  justify-content: center;
  align-items: center;
}

#carrier1, #carrier2, #carrier3, #carrier4 {
  width: 250px;
  height: 180px;
  border-style: solid;
  margin: 1.5rem 2rem;
  border-color: black;
  box-shadow: 0 1px 5px rgba(104, 104, 104, 0.8);
}

/* Contacts Section */
#submit {
  padding: .6rem 3rem;
  background: black;
  color: white;
  font-weight: bold;
  box-shadow: 0 1px 5px rgba(104, 104, 104, 0.8);
}

#submit:hover {
  background: white;
  color: black;
  cursor: pointer;
}

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

#form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#email {
  height: 50px;
  width: 500px;
  margin-bottom: 1.3rem;
}

h3 {
  font-size: 1.5rem;
  text-align: center;
}

/* Footer Section */
#wrapper-3 {
  display: flex;
  flex-direction: column;
  background: #ddd;
  margin: 0 30px 25px 30px;
  box-shadow: 0 1px 5px rgba(104, 104, 104, 0.8);
 }

#landed {
  margin: 0px 30px;
  padding: 10px 0;
  color: black;
  font-weight: bold;
}

#lander {
  display: flex;
  justify-content: flex-end;
  padding-right: 30px;
  font-weight: bold;
}

/* Media Queries */
@media(max-width: 1300px) {
  #wrapper-2 {
  display: grid;
  grid-template-areas: 
    "carrier carrier" 
    "carrier carrier";
  }
}

@media(max-width: 950px) {
  #list-header {
    font-size: 1.5rem;
  }
  
  #hero, #hero2 {
    margin-left: 2rem;
  }
  
  #hero {
    font-size: 1.5rem;
  }
  
  #hero2 {
    font-size: 2.3rem;
  }
  
  #wrapper #list-bold {
    font-size: 2.3rem;
  }
}

@media(max-width: 800px) {
  #list-header {
    font-size: 1rem;
  }
  #nav-bar ul {
    display: grid;
    grid-template-areas:
      "features products"
      "carriers contact";
  }
  
  .flex-container {
    height: 100px;
    display: flex;
    justify-content: center;
  }
}

@media(max-width: 625px) {
  #wrapper-2 {
    display: flex;
    flex-direction: column;
  }
  
  #hero {
    font-size: 1.4rem;
  }
  
  #hero2 {
    font-size: 1.8rem;
  }
}

@media(max-width: 550px) {
  #email {
    width: 300px;
  }
}

@media(max-width: 500px) {
  #nav-bar li {
    padding: 0;
  }
  #nav-bar a {
    padding: .8rem 0;
  }
  #wrapper {
    display: flex;
    flex-direction: column;
  }
  
  #list-header {
    font-size: 2rem;
  }
  
  #wrapper #list-bold {
    font-size: 1.7rem;
  }
  }
}

@media(max-width: 450px) {
  #wrapper-3 {
    margin-bottom: 20px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console