Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <body>
<div id="main">
<h1 id="title"> Survey Form </h1>
  <div id="outer-form">
    <p id="description"> Please, fill the form below. This is completely anonimouslu. </p>
    <form id="survey-form">
      <div class="row">
        <div class="labels">
          <label for="name" id="name-label" > Your Name </label>
        </div>
        <div class="right">
          <input type="text" name="name" id="name" class="input-field" placeholder="Enter your name here" required autofocus> </div> 
        </div>
      <div class="row">  
        <div class="labels">
          <label for="email" id="email-label"> Your Email </label> 
        </div>
        <div class="right">
          <input type="email" name="firstname" id="email" class="input-field" placeholder="Enter your email here" required> 
        </div> 
      </div>
      <div class="row">
        <div class="labels"> 
          <label for="number" id="number-label"> Age </label> 
        </div>
        <div class="right">
          <input type="number" name="firstname" id="number" class="input-field" min="1" max="100" placeholder="Age" required> 
        </div> 
      </div>
      <div class="row">
        <div class="labels">
          <label for="dropdown" id="dropdown-label"> Which option describes best your role? </label>           </div>
        <div class="right">
          <select id="dropdown">
            <option value="Select an option" disabled > Select an option </option>
            <option value="Student" selected> Student </option>
            <option value="jobFull"> Full time job </option>
            <option value="jobPartial"> Partial time job </option>
            <option value="stayHome"> Stay at home </option>
            <option value="preferNot"> Prefer not to say </option>
          </select> 
        </div> 
      </div>
      <div class="row">
        <div class="labels"> Would you recommend Free Code Camp? </div>
        <div class="right">
          <input type="radio" name="recommend" id="definitely" value="definitely" checked> 
            <label for="definitely"> Definitely </label> <br>
          <input type="radio" name="recommend" id="maybe" value="maybe" > 
            <label for="maybe">Maybe</label> <br>
          <input type="radio" name="recommend" id="notSure"value="notSure"> 
            <label for="notSure"> Not sure</label> 
        </div>
      </div> 
      <div class="row">
        <div class="labels">
          <label for="dropdown" id="dropdown-label"> What do you like most in FCC? </label>           </div>
        <div class="right">
          <select id="dropdown">
            <option value="Select an option" disabled selected > Select an option </option>
            <option value="Student"> Challenges </option>
            <option value="jobFull"> Projects </option>
            <option value="jobPartial"> Community </option>
            <option value="stayHome"> Open source </option>
          </select> 
        </div> 
      </div>
      <div class="row">
        <div class="labels"> Things that should be improved in the future
(Check all that apply):</div>
        <div class="right">
          <input type="checkbox" name="improve" id="fronproject" value="fp"> 
            <label for="frontproject"> Front-End projects</label> <br>
          <input type="checkbox" name="improve" id="backproject" value="bp" > 
            <label for="backproject">Back-End projects</label> <br>
          <input type="checkbox" name="improve" id="datvis"value="dv"> 
            <label for="datvis">Data Visualization</label> <br>
          <input type="checkbox" name="improve" id="chal"value="cl"> 
            <label for="chal">Challenges</label> <br>
          <input type="checkbox" name="improve" id="opnsrc"value="os"> 
            <label for="opnsrc">Open Source Community</label> <br>
          <input type="checkbox" name="improve" id="githr"value="gh"> 
            <label for="githr">Gitter help rooms</label> <br>
          <input type="checkbox" name="improve" id="videos"value="vd"> 
            <label for="videos">Videos</label> <br>
          <input type="checkbox" name="improve" id="citmet"value="cm"> 
            <label for="citmet">City Meetups</label> <br>
          <input type="checkbox" name="improve" id="adcour"value="ac"> 
            <label for="adcour">Additional Courses</label> <br>
          <input type="checkbox" name="improve" id="wiki"value="wk"> 
            <label for="wiki">Wiki</label> <br>
          <input type="checkbox" name="improve" id="forum"value="fm"> 
            <label for="forum">Forum</label> <br>
        </div>
    </div> 
      <div class="row">
        <div class="labels"> Any Comments or Suggestions? </div>
        <div class="right">
          <textarea id="comments" name="message" placeholder="Enter your comments here"></textarea> 
        </div> 
      </div>
      <button type="submit" id="submit">Submit </button> 
    </form>
  </div>
</div>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

</body>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Maven+Pro);
body {
   background: linear-gradient(65deg, #5791B3, #A8663F);
  font-family: 'Maven Pro', sans-serif; 
}
#main {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}
#title {
  text-align: center;
  font-size: 2em;
  display: block;
  background: linear-gradient(-5deg, #A8663F, #5791B3);
}
#outer-form {
  width: 75%;
  padding: 5px; /* remover luego */
  margin: 10px auto;
  background-color: #D5E4EC;
  border-radius: 5px;
}
#description {
  text-align: center;
}
.row {
  display: flex;
  flex-direction: row;
  margin: 10px auto;
}
.labels {
  width: 50%;
  text-align: right;
  padding-right: 10px;
}
.right {
  width: 48%;
  text-align: left;
  vertical-align: middle;
}
.input-field {
  width: 90%;
  border: 2px solid #3F81A8;
  border-radius: 3px;
  height: 1.8em;
  font-family: 'Maven Pro', sans-serif; 
}
#dropdown {
  width: 60%;
  border: 2px solid #3F81A8;
  border-radius: 3px;
  height: 1.8em;
  background-color: white;
  font-family: 'Maven Pro', sans-serif; 
}
#comments {
  border: 2px solid #3F81A8;
  border-radius: 2px;
  height: 4em;
  width:  80%;
  resize: vertical;
  font-family: 'Maven Pro', sans-serif; 
}
#submit{
  width: 7em;
  height: 3em;
  border: 0 solid;
  border-radius: 2px;
  color: white;
  background-color: #5791B3;
  display: block;
  margin: 0.5em auto;
}
  @media only screen and (max-width: 400px) {
  .row {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
  }
    .labels  {
      width: 90%;
      padding-bottom: 0.5em;
      margin-bottom: 0em;
      text-align: left;
    }
    .right {
      width: 100%;
      padding: 0.5em 0.1em;
      text-align: left;
      vertical-align: middle;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console