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>
<style>
@import url('https://fonts.googleapis.com/css?family=Acme');
</style>
<h1 id="title">Survey Form</h1>
<p id="description">Let us know about your opinion on Game of Thrones</p>
<form id="survey-form">
  <label for="name" id="name-label">* Name: </label>
  <input type="text" id="name" placeholder="Enter your name" required>
  <label for="email" id="email-label">* Email: </label>
  <input type="email" id="email" placeholder="Enter your email" required>
  <label for="number" id="number-label">* Age:</label>
  <input type="number" id="number" placeholder="Age" min="5" max="99">
  <label for="dropdown" id="dropdown-label">Do you like Game of Thrones?</label>
  <select id="dropdown">
    <option value="yes">Oh yes!!</option>
    <option value="no">No, I hate it now</option>
    <option value="maybe">I am confused</option>
  </select>
  <label id="radio-label">What made you most excited about Game of Thrones?</label>
  <div id="radio">
    <label for="dany">
      <input type="radio" name="excited" id="dany" value="dany" checked>Daenerys Targaryen's miracles
    </label>
    <label for="bowl">
      <input type="radio" name="excited" id="bowl" value="bowl">Clegane Bowl
    </label>
    <label for="living">
      <input type="radio" name="excited" id="living" value="living">Fight between the living and the dead
    </label>
  </div>
  <label id="checkbox-label">Which houses do you support?</label>
  <div id="checkbox">
    <label for="targ">
     <input type="checkbox" name="support" id="targ" value="targ">Targaryen
    </label>
    <label for="stark">
      <input type="checkbox" name="support" id="stark" value="stark">Stark
    </label>
    <label for="lan">
      <input type="checkbox" name="support" id="lan" value="lan">Lannister
    </label>
    <label for="bar">
      <input type="checkbox" name="support" id="bar" value="bar">Baratheon
    </label>
    <label for="tyr">
      <input type="checkbox" name="support" id="tyr" value="tyr">Tyrell
    </label>
    <label for="gj">
      <input type="checkbox" name="support" id="gj" value="gf">Greyjoy
    </label>
  </div>
  <label for="textbox" id="textbox-label">Share the things that you will miss from GoT:</label>
  <textarea id="textbox" placeholder="Share your thoughts here..."></textarea>
  <button type="submit" id="submit">Submit</button>
</form>
              
            
!

CSS

              
                body{
  font-family: 'Acme', sans-serif;
  background-color: LightSteelBlue;
}
input[type="text"], input[type="email"], input[type="number"], select, textarea{
  width: 50%;
}
@media (max-width: 800px){
    input[type="text"], input[type="email"], input[type="number"], select, textarea{
    width: 80%;
  }
}
label[for]{
  display: block;
}
#title, #description{
  text-align: center;
}
#survey-form{
  background-color: white;
  margin: 5%;
  padding: 3%;
  box-shadow: 5px 5px 5px 5px #deb0ba, -5px 5px 5px 5px #deb0ba;
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: repeat(9, auto);
  grid-template-areas: 
    "name name-ip"
    "email email-ip"
    "number number-ip"
    "dropdown dropdown-ip"
    "radio radio-ip"
    "checkbox checkbox-ip"
    "textbox textbox-ip";
}
#name-label{
  margin: 5px;
  padding: 5px;
  grid-area: name;
  justify-self: end;
}
#name{
  margin: 5px;
  padding: 5px;
  grid-area: name-ip;
}
#email-label{
  margin: 5px;
  padding: 5px;
  grid-area: email;
  justify-self: end;
}
#email{
  margin: 5px;
  padding: 5px;
  grid-area: email-ip;
}
#number-label{
  margin: 5px;
  padding: 5px;
  grid-area: number;
  justify-self: end;
}
#number{
  margin: 5px;
  padding: 5px;
  grid-area: number-ip;
}
#dropdown-label{
  margin: 5px;
  padding: 5px;
  grid-area: dropdown;
  justify-self: end;
}
#dropdown{
  margin: 5px;
  padding: 5px;
  grid-area: dropdown-ip;
}
#radio-label{
  margin: 5px;
  padding: 5px;
  grid-area: radio;
  justify-self: end;
}
#radio{
  margin: 5px;
  padding: 5px;
  grid-area: radio-ip;
}
#checkbox-label{
  margin: 5px;
  padding: 5px;
  grid-area: checkbox;
  justify-self: end;
}
#checkbox{
  margin: 5px;
  padding: 5px;
  grid-area: checkbox-ip;
}
#textbox-label{
  margin: 5px;
  padding: 5px;
  grid-area: textbox;
  justify-self: end;
}
#textbox{
  margin: 5px;
  padding: 5px;
  grid-area: textbox-ip;
  height: 100px;
}
#submit{
  background-color: #ded9b0;
  border: none;
  font-size: 1.2em;
  font-family: 'Acme', sans-serif;
  margin: 5px;
  padding: 10px;
  grid-area: submit;
  grid-column: 1/3;
  justify-self: center;
}
#submit:hover{
  cursor: pointer;
}
              
            
!

JS

              
                
              
            
!
999px

Console