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

              
                <!-- <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="footer, address, iphone, icons" , "FreeCodeCamp" , "Product Landing Page" , "Projects" /> -->
<header id="header">
  <figure>
    <img id="header-img" src="https://is.gd/34ijR1" alt="">
    <figcaption id="img-text"><a id="header-img-link" href="https://apple.com">Apple</a></figcaption>
  </figure>
  <nav id="nav-bar">
    <a class="nav-link" href="#video">Watch</a>
    <a class="nav-link" href="#table-compare">Features</a>
    <a class="nav-link" href="#contact">Contact</a>
  </nav>

</header>
<main>
  <div class="main-content">
    <div class="discription">
      <h2 id="disc-text-1">iPhone</h2>
      <p id="disc-text">Just the <br>right amount<br>of everything</p>
    </div>

    <iframe id="video" width="560" height="315" src="https://www.youtube-nocookie.com/embed/po_52OYBc-o" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </div>
  <div class="section-content">

    <div id="table-compare">
      <div class="column">
        <div class="column-header">
          <h2>iPhone 11 pro</h2>
        </div>
        <figure class="column-image image-iphone-11-pro"></figure>
        <h2 class="price">999$</h2>
        <div class="column-text">
          <p>Triple-camera system (Ultra Wide, Wide, Telephoto)</p>
          <p>Up to 20 hours of video playback1</p>
          <p>Water resistant to a depth of 4 meters for up to 30 minutes</p>
        </div>
      </div>

      <div class="column">
        <div class="column-header">
          <h2>iPhone 11</h2>
        </div>
        <figure class="column-image image-iphone-11"></figure>
        <h2 class="price">999$</h2>
        <div class="column-text">
          <p>Triple-camera system (Ultra Wide, Wide, Telephoto)</p>
          <p>Up to 20 hours of video playback1</p>
          <p>Water resistant to a depth of 4 meters for up to 30 minutes</p>
        </div>
      </div>

      <div class="column">
        <div class="column-header">
          <h2>iPhone se</h2>
        </div>
        <figure class="column-image image-iphone-se"></figure>
        <h2 class="price">999$</h2>
        <div class="column-text">
          <p>Triple-camera system (Ultra Wide, Wide, Telephoto)</p>
          <p>Up to 20 hours of video playback1</p>
          <p>Water resistant to a depth of 4 meters for up to 30 minutes</p>
        </div>
      </div>

    </div>

  </div>

  <form id="form" class="" method="post" action="https://www.freecodecamp.com/email-submit">

    <input id="email" type="email" name="email" placeholder="Enter Your Email" required>
    <input id="submit" type="submit" name="input" value="Submit">

  </form>

</main>

<footer id="footer">
  <ul>
    <li><a class="footer-link" href="#">Privacy</a></li>
    <li><a id="contact" class="footer-link" href="mailto:abdulrahman.mhd.anas@protonmail.com">Contact</a></li>
    <li><a class="footer-link" href="https://twitter.com/Abdulra22693017">Twitter</a></li>
  </ul>

  <p id="footer-end">thank you for visit my webpage, have a nice day!</p>
</footer>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Courgette&family=Roboto&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f5f5f5;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  text-align: center;
  height: 100vh;
}

header {
  position: fixed;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: hsl(0, 0%, 90.5%);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19);
  overflow: hidden;
  min-width: 100vw;
  padding: 1rem;
}

#header-img {
  width: 50px;
  height: 50px;
  margin: 0 auto;
}

img {
  display: block;
  m,ax-width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  figure {
    margin: 0 auto;
  }
}

nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  /*  display: inline-flex; */
  font-weight: bolder;
}
@media (min-width: 500px) {
  nav {
    font-size: 1.5rem;
  }
}

.nav-link + .nav-link {
  margin-left: 1em;
}
.nav-link {
  text-decoration: none;
  padding: 0 10px;
  letter-spacing: 0.1em;
  color: #303030;
}

a:hover {
  color: hsl(50, 100%, 45%);
  border-bottom: 3px solid hsl(50, 100%, 45%);

  transform: scale(1.1);
}

#img-text {
  margin: 0 auto;
  font-size: 25px;
  font-weight: 600;
  font-family: Arial Narrow;
  letter-spacing: 0.002em;
}

footer {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgb(52, 53, 55);
  color: #fffafa;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  footer {
    position: static;
  }
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #img-text {
    margin: 0 auto;
  }
}

li {
  list-style-type: none;
  letter-spacing: 0.1em;
  padding: 20px;
  font-size: 20px;
}

#footer-end {
  text-transform: uppercase;
  font-family: "Courgette", cursive;
  font-size: 30px;
}

ul {
  display: flex;
  justify-content: center;
}

a {
  text-decoration: none;
  color: #fffafa;
}

#header-img-link {
  color: #303030;
}

iframe {
  margin-top: 50px;
  margin-bottom: 50px;
  border-radius: 5px;
  box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.25);
  justify-content: flex-end;
  margin-left: 30px;
}

input {
  display: block;
  margin: 0 auto;
  font-family: inherit;
}

#email {
  border-radius: 3px;
  border: none;
  font-size: 25px;
  padding: 0 5px;
}

#submit {
  margin-top: 7px;
  border-radius: 3px;
  padding: 0.4rem 1.5rem;
  font-size: 20px;
  color: white;
  background-color: brown;
  border: none;
}

.main-content {
  display: flex;
  justify-content: center;
  flex-direction: row-reverse;
  margin-top: 110px;
}

.discription {
  align-self: flex-start;
  margin-top: 50px;
  margin-left: 30px;
}

#disc-text-1 {
  font-size: 30px;
  font-weight: 600;
}

#disc-text {
  margin-top: 10px;
  font-weight: 600;
  font-size: 48px;
  line-height: 1.08349;
}

figure {
  display: flex;
  flex-direction: column;
}

.image-iphone-11-pro {
  width: 190px;
  height: 251px;
  background-size: center center;
  background-repeat: no-repeat;
  background-image: url("https://www.apple.com/v/iphone/home/am/images/overview/compare/compare_iphone_11_pro__fvqwhr4dkhiu_large.jpg");
}

.column-image {
  margin-bottom: 30px;
  margin: 0 auto;
}

.image-iphone-11 {
  width: 190px;
  height: 251px;
  background-size: center center;
  background-repeat: no-repeat;
  background-image: url("https://www.apple.com/v/iphone/home/am/images/overview/compare/compare_iphone_11__f0r1z5etd722_large.jpg");
}

.image-iphone-se {
  width: 135px;
  height: 251px;
  background-size: 135px 251px;
  background-repeat: no-repeat;
  background-image: url("https://www.apple.com/v/iphone/home/am/images/overview/compare/compare_iphone_se__buv6h7jbk5n6_large.jpg");
}
.section-content {
  margin: 0 auto;
  /*     text-align: center;
    border: 1px solid black; */
}

#table-compare {
  display: flex;
  gap: 50px;
  padding: 1rem;
  margin: 0 auto;
}

.column {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  border-radius: 5px;
  background-color: #fff;
  padding: 1rem 1.2rem;
}

.column-text {
  text-align: left;
  padding-left: 10px;
  line-height: 2.8;
}

main {
  min-height: 100%;
}

.price {
  margin-top: 30px;
}

.column-header {
  margin-top: 10px;
}

#form {
  margin-top: 30px;
  margin-bottom: 30px;
}

@media (max-width: 690px) {
  nav {
    padding-left: 5px;
    padding-right: 5px;
    display: flex;
    justify-content: space-around;
    width: 100%;
  }
  .main-content {
    margin-top: 180px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
  }
  iframe {
    width: max-content;
  }
  #table-compare {
    display: flex;
    flex-direction: column;
    max-width: 360px;
  }
  .discription {
    margin: 0 auto;
  }
  iframe {
    margin: 20px auto;
  }
  #header {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-around;
    flex-direction: column;
    height: 150px;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console