123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<div class="container">
  <header>
     <h1 id="title">Fortnite Survey Form</h1>
  </header>
  <main>
    <div class="form-body">
      <p class="lead" id="description">
        Thank you for playing <a href="https://www.epicgames.com/fortnite/en-US/home">Fortnite</a>! We hope to hear from you about your experiences and what can be improved. Please take our 5 minute survey to earn 100 V-bucks!<small> (Not really, this is a non-functional form for demo purposes.)</small>
      </p>
      <form action="" id="survey-form">
        <div class="form-group">
          <label for="name" id="name-label" class="label">Name</label>
          <input type="text" id="name" class="input" required placeholder="Fortnite Pro">
        </div>
        <div class="form-group">
          <label for="email" id="email-label" class="label" >Email</label>
          <input type="email" id="email" required placeholder="fortnitepro@epic.com">
          </div>
        <div class="form-group">
        <label for="number-label" id="number-label">
        How many hours a week do you play Fornite?
        </label>
          <input type="number" id="number" required style="height:1rem" min="0" max="168" placeholder="0-168">
         </div>
        <div class="form-group">
          <label for="dropdown" id="dropdown-label">
            What is your favorite weapon?</label>
          <select name="dropdown" id="dropdown" style="height:2rem">
            <option disabled selected>Please select a weapon</option>
            <option value="shotgun">Shotgun</option>
            <option value="pistol">Pistol</option>
            <option value="rifle">Assault Rifle</option>
            <option value="sniper">Sniper</option>
            <option value="grenade">Grenade</option>
            <option value="trap">Trap</option>
            <option value="rocket">Rocket Launcher</option>
            <option value="grenade-launcher">Grenade Launcher</option>
          </select>
         </div>
        
          <label for="enjoy" id="enjoy">What is most enjoyable in Fortnite?</label>
            <div class="form-group less-margin">
                      <div>
      <input type="radio" name="enjoy" value="loot" id="kills" value="kiils"><label for="kills">Getting kills</label>
          </div>
        <div>
      <input type="radio" name="enjoy" value="loot" id="loot"><label for="loot">Looting items</label>
          </div>
        <div>
        <input type="radio" name="enjoy" value="building" id="building"><label for="building">Building structures</label>
          </div>
        <div>
          <input type="radio" name="enjoy" value="victory" id="victory"><label for="victory">Victory Royale</victory>
        </div>
        <div>
          <input type="radio" name="enjoy" value="exploring" id="exploring"><label for="exploring">Exploring new places</label>
        </div>
        <div>
          <input type="radio" name="enjoy" value="teamwork" id="teamwork"><label for="teamwork">Playing as a team</label>
        </div>
                    </div>

        <label for="places" id="places">Where are your favorite places to land?</label>
                <div class="form-group less-margin">
        <div>  
          <input type="checkbox" name="towers" value="towers">Tilted Towers
          </div>
        <div>
          <input type="checkbox" name="retail" value="retail">Retail Row
          </div>
        <div>
          <input type="checkbox" name="dusty" value="dusty">Dusty Depot  
        </div>
        <div>
          <input type="checkbox" name="risky" value="risky">Risky Reels  
        </div>
        <div>
          <input type="checkbox" name="moisty" value="moisty">Moisty Mire  
        </div>
        <div>
          <input type="checkbox" name="retail" value="retail">Retail Row  
        </div>
        <div>
          <input type="checkbox" name="salty" value="salty">Salty Springs  
        </div>
        <div>
          <input type="checkbox" name="pleasant" value="pleasant">Pleasant Park  
        </div>
          </div>
        <div class="form-group" style="margin-bottom:-10px">
        <label for="suggestions">Please tell us anything you would like to suggest to make Fortnite better.</label><br>
        <textarea placeholder="Make a suggestion or two!" name="suggestions" id="suggestions" cols="30" rows="5" class="input"></textarea>
          </div>
        <div class="submit-area">
        <button type="submit" id="submit">Submit</button>
          </div>
     </form>
   </div>
  </main>
  <footer>
    <span>
      Fortnite is a trademark of Epic Games
    </span>
    <span id="author">
      Survey by <a href="https://www.davidlau.xyz/">David Lau</a>
    </span>
  </footer>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Noto+Sans');

@font-face{ src:url('https://storage.googleapis.com/www.aculau.com/fonts/BurbankBigCondensed-Bold.otf') format('opentype');
  font-family:'Burbank'
}

body{
  background-color:#444;
  color:#FFF;
  font-family: Noto Sans;
  margin:0;
}

header{
  grid-column:1/4;
  grid-row:1/2;
  justify-self:center;
  background-color:rgba(0,0,0,.70);
  border-radius:.5em;
  text-align:center;
  margin:1em .5rem 0rem .5rem;
}

main{
  grid-column:1/4;
  grid-row:2/3;
  display:grid;
  grid-template-columns:minmax(200px, 600px);
  justify-self:center;
}

.container{
  display:grid;
  grid-template-columns:repeat(3,auto);
  grid-template-rows:auto 1fr auto;
  min-height:100vh;
  background-image:url('https://images8.alphacoders.com/903/903577.jpg');
  background-position:center top;
  background-repeat:no-repeat;
  grid-row-gap:15px;
  background-attachment:fixed;
}

footer{
  background-color:#222;
  font-size:14px;
  padding:.5em  1em !important;
  height:100%;
  grid-column:1/4;
  display:grid;
  align-items:center;
  grid-column-gap:1rem;
  grid-template-columns:repeat(2,auto)
}

.container>*{
  padding:0 .5em;
}

.form-body{
  background-color:rgba(0,0,0,.70);
  border-radius:.5rem;
  padding:0 1rem;
}

.form-group{
  display:grid;
  grid-template-columns:1fr;
  grid-template-areas:'label' 'input';
  margin:1rem 0;
}

.label{
  grid-area:label;
  justify-self:start;
}

.input{
  grid-area:input;
}

@media screen and (min-width:500px){
  .container>*{
    padding:0 1em;
  }
  
  .form-group{
    grid-template-columns:1fr 1fr;
    grid-template-areas:'label input';
    grid-column-gap:2rem;
  }
  
  .label{
    justify-self:end;
  }
}

h1{
  text-shadow:3px 3px black;
  font-family:Burbank;
  font-size:2.5rem;
}

.lead{
  font-family:Noto Sans;
  text-align:center;
}

#author{
  justify-self:end;
}

input,select, textarea{
  border-radius:.25rem;
  padding:.25rem .25rem;
}

#enjoy, #places{
  grid-column:1/3;
  
}

input[type="radio"], input[type="checkbox"] {
  margin-right:.5rem;
}

.submit-area{
  display:grid;
}

#submit{
  justify-self:center;
  margin-bottom:1rem;
  background-color:lightgreen;
  font-size:1.4rem;
  border-radius:.5rem;
  border-color:green;
  border-width:4px;
  cursor:pointer;
}

a:visited{
  color:lightblue;
}

a{
  color:orange;
}

.less-margin{
  margin-top:0;
}

input{
  font-family:inherit;
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console