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 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

              
                <header id="header">
  <img id="header-img" src="https://diamondpearl.pokemon.com/en-us/assets/logo_bd.png" alt="Pokemon Brilliant Diamond logo">
  <nav id="nav-bar">
    <ul>
      <li><a href="#trailer" class="nav-link">Trailer</a></li>
      <li><a href="#starters" class="nav-link">Starters</a></li>
      <li><a href="#form" class="nav-link">Subscribe</a></li>
    </ul>
  </nav>
  <img id="perle" src="https://diamondpearl.pokemon.com/en-us/assets/logo_sp.png" alt="Pokemon Shining Pearl logo">
</header>

<div id="wrapper">
  <section id="trailer">
    <h2>Welcome back to Sinnoh!</h2>
    <p>Experience the nostalgia of Pokémon Diamond™ and Pokémon Pearl™ in an adventure reborn on Nintendo Switch™ systems.</p>
    <p>The original story has been faithfully reproduced, and these remakes include easy-to-understand, player-friendly conveniences of the modern Pokémon series, plus up-close-and-personal Pokémon battle scenes.</p>
    <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/HbDP99V0BDU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </section>

  <section id="starters">
    <h2>First partner Pokémon</h2>
    <p>Before you set off on your journey, you’ll choose Turtwig, Chimchar, or Piplup to be your first partner Pokémon.</p>
    <div id="pkmn">
      <div id="turtwig">
        <h3>Turtwig</h3>
        <img class="sprite" src="https://diamondpearl.pokemon.com/assets/story/turtwig.png" alt="Turtwig sprite">
        <p class="cat"><img class="type" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Pokémon_Grass_Type_Icon.svg/512px-Pokémon_Grass_Type_Icon.svg.png" alt=""> Grass</p>
        <p>Made from soil, the shell on its back hardens when it drinks water. It lives along lakes.</p>
        <p>It undertakes photosynthesis within its body, making oxygen. The leaf on its head wilts if the Pokémon is thirsty.</p>
      </div>
      <div id="chimchar">
        <h3>Chimchar</h3>
        <img class="sprite" src="https://diamondpearl.pokemon.com/assets/story/chimchar.png" alt="Chimchar sprite">
        <p class="cat"><img class="type" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Pokémon_Fire_Type_Icon.svg/640px-Pokémon_Fire_Type_Icon.svg.png" alt=""> Fire</p>
        <p>It agilely scales sheer cliffs to live atop craggy mountains. Its fire is put out when it sleeps.</p>
        <p>Its fiery rear end is fueled by gas made in its belly. Even rain can’t extinguish the fire.</p>
      </div>
      <div id="piplup">
        <h3>Piplup</h3>
        <img class="sprite" src="https://diamondpearl.pokemon.com/assets/story/piplup.png" alt="Piplup sprite">
        <p class="cat"><img class="type" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Pokémon_Water_Type_Icon.svg/512px-Pokémon_Water_Type_Icon.svg.png" alt=""> Water</p>
        <p>It agilely scales sheer cliffs to live atop craggy mountains. Its fire is put out when it sleeps.</p>
        <p>Its fiery rear end is fueled by gas made in its belly. Even rain can’t extinguish the fire.</p>
      </div>
    </div>
  </section>

  <form id="form" action="https://www.freecodecamp.com/email-submit">
    <h2>Subscribe to our newsletter</h2>
    <div id="formulaire">
      <input type="email" name="email" id="email" placeholder="Enter your email" required>

      <input type="submit" id="submit">
    </div>
  </form>
</div>

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

CSS

              
                body {
  font-family: "Montserrat", serif;
  color: #004682;
  background: linear-gradient(
    90deg,
    rgba(117, 191, 255, 0.5) 0%,
    rgba(130, 186, 247, 0.5) 35%,
    rgba(255, 140, 169, 0.5) 100%
  );
  line-height: 1.8;
}

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  width: 100%;
  z-index: 3;
  position: -webkit-sticky;
  position: sticky;
  top: 0px;
  background: linear-gradient(90deg, #006dcc 0%, #0c63c0 35%, #e00038 98%);
  padding: 10px;
}

#header-img {
  height: inherit;
}

#perle {
  height: inherit;
}

#nav-bar ul {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  list-style: none;
  overflow: hidden;
}

#nav-bar li a {
  display: block;
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.3rem;
  padding: 0 20px;
}

#nav-bar li a:hover {
  border-bottom: 4px solid #fff;
}

#wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

section,
form {
  background-color: #fff;
  border-radius: 20px;
  width: 80%;
  margin: 30px;
  padding: 10px 30px;
  text-align: center;
  border: 8px solid rgba(52, 0, 104, 0.05);
}

#pkmn {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  @media (max-width: 779px) {
    display: flex;
    flex-direction: column;
  }
}

.type {
  width: 1em;
}

.sprite {
  max-width: 80%;
  width: 150px;
  height: auto;
}

#turtwig,
#chimchar,
#piplup {
  padding: 10px;
  margin: 0 10px;
}

#turtwig h3 {
  color: #3bbc4c;
}

#chimchar h3 {
  color: #ff9740;
}

#piplup h3 {
  color: #3692dd;
}

.cat {
  font-weight: bold;
}

#pkmn p {
  font-size: 0.8rem;
}

#formulaire {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 20px;
}

#email {
  margin-top: -10px;
  margin-bottom: 20px;
  line-height: inherit;
  font-family: inherit;
  width: 80%;
  padding: 5px;
  text-align: center;
}

#submit {
  line-height: inherit;
  font-family: inherit;
  padding: 5px;
  border: none;
  background-color: #004682;
  color: #fff;
  width: 50%;
}

@media (max-width: 779px) {
  #pkmn {
    display: flex;
    flex-direction: column;
  }

  iframe {
    max-width: 90%;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console