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

              
                <head>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<link href="https://fonts.googleapis.com/css?family=Raleway:400,500" rel="stylesheet" type="text/css">
</head>

<body>
<header>
  <h1 id="title">Survey Form</h2>
</header>
<main>
  <p id="description">Let us know how we can improve freeCodeCamp</p>
  <form id="survey-form">
    
    <div class="row-tab">
      <div class="left-tab"><label id="name-label" for="name">*Name:</label></div>
      <div class="right-tab"><input type="text" id="name" class="text-input" name="name" placeholder="Enter your name" required autofocus></div>
    </div>
    
    <div class="row-tab">
      <div class="left-tab"><label id="email-label" for="email">*Email:</label></div>
      <div class="right-tab"><input type="email" id="email" class="text-input" name="email" placeholder="Enter your email" required></div>
    </div>
    
    <div class="row-tab">
      <div class="left-tab"><label id="number-label" for="number">*Age:</label></div>
      <div class="right-tab"><input type="number" id="number" class="text-input" name="number" placeholder="Age" min="0" max="150" required></div>
    </div>
    
    <div class="row-tab">
      <div class="left-tab"><label id="dropdown-label" for="dropdown">Which option best describes your current role?</label></div>
      <div class="right-tab">
        <select id="dropdown" class="selection-input" form="survey-form">
          <option value="student">Student</option>
          <option value="full-time-job">Full Time Job</option>
          <option value="full-time-learner">Full Time Learner</option>
          <option value="prefer-not-to-say">Prefer not to say</option>
          <option value="other">Other</option>
        </select>
      </div>
    </div>
    
    <div id="recommendation-level-div" class="row-tab">
      <div class="left-tab"><label for="recommendation-level-div">* How likely is that you would recommend freeCodeCamp to a friend?</label></div>
      <div class="right-tab">
        <label for="definitely" class="block"><input type="radio" id="definitely" name="recommendation-level" value="definitely">Definitely</label>
        <label for="maybe" class="block"><input type="radio" id="maybe" name="recommendation-level" value="maybe">Maybe</label>
        <label for="not-sure" class="block"><input type="radio" id="not-sure" name="recommendation-level" value="not-sure">Not sure</label>
      </div>
    </div>
    
    <div class="row-tab">
      <div class="left-tab"><label id="dropdown-what-do-you-like-label" for="dropdown-what-do-you-like">What do you like most in FCC:</label></div>
      <div class="right-tab">
        <select id="dropdown-what-do-you-like" class="selection-input" form="survey-form">
          <option value="challenges">Challenges</option>
          <option value="projects">Projects</option>
          <option value="community">Community</option>
          <option value="open-source">Open Source</option>
        </select>
      </div>
    </div>
    
    <div id="checkbox-div" class="tab-row">
      <div class="left-tab"><label for="checkbox-div">Things that should be improved in the future
        (Check all that apply):</label></div>
      <div class="right-tab">
        <label for="front-end-projects" class="block"><input type="checkbox" id="front-end-projects" value="front-end-projects" name="front-end-projects">Front-end Projects</label>
        <label for="back-end-projects" class="block"><input type="checkbox" id="back-end-projects" value="back-end-projects" name="back-end-projects">Back-end Projects</label>
        <label for="data-visualization" class="block"><input type="checkbox" id="data-visualization" value="data-visualization" name="data-visualization">Data Visualization</label>
        <label for="challenges" class="block"><input type="checkbox" id="challenges" value="challenges" name="challenges">Challenges</label>
        <label for="open-source-community" class="block"><input type="checkbox" id="open-source-community" value="open-source-community" name="open-source-community">Open Source Community</label>
        <label for="gitter-help-rooms" class="block"><input type="checkbox" id="gitter-help-rooms" value="gitter-help-rooms" name="gitter-help-rooms">Gitter help rooms</label>
        <label for="videos" class="block"><input type="checkbox" id="videos" value="videos" name="videos">Videos</label>
        <label for="city-meetups" class="block"><input type="checkbox" id="city-meetups" value="city-meetups" name="city-meetups">City Meetups</label>
        <label for="wiki" class="block"><input type="checkbox" id="wiki" value="wiki" name="wiki">Wiki</label>
        <label for="forum" class="block"><input type="checkbox" id="forum" value="forum" name="forum">Forum</label>
        <label for="additional-courses" class="block"><input type="checkbox" id="additional-courses" value="additional-courses" name="additional-courses">Additional Courses</label>
      </div>
    </div>
    
    <div class="row-tab">
      <div class="left-tab"><label for="textarea">Any Comments or Suggestions?</label></div>
      <div class="right-tab"><textarea id="textarea" name="textarea" rows="5" cols="33" placeholder="Enter your comment here..."></textarea></div>
    </div>
    
    <div class="row-tab">
      <button id="submit">Submit</button>
    </div>
  </form>
</main>
</body>
              
            
!

CSS

              
                body {
  background-color: #D2E9E7;
  padding: 30px;
  font-family: Raleway;
}

h1, p {
  text-align: center;
}

main {
  background-color: white;
  padding: 20px 20px;
}

.row-tab {
  text-align: center;
  margin: 20px;
}

.left-tab {
  display: inline-block;
  vertical-align: top;
  text-align: right;
  width: 50%;
  margin-right: 1px;
  margin-bottom: 5px;
}

.right-tab {
  display: inline-block;
  vertical-align: top;
  text-align: left;
  width: 48%;
}

.block {
  display: block;
  margin-bottom: 10px;
}

.text-input, .selection-input {
  width: 120px;
  max-width: 100%;
}

#textarea {
  max-width: 100%;
}

#submit {
  background-color: #59ace0;
  border-radius: 4px;
  color: white;
  font-size: 1em;
  height: 40px;
  width: 96px;
  margin: 10px;
  border: 0px solid;
}

@media (max-width: 450px) {
  main {
    padding: 20px 5px;
  }
  
  .left-tab {
    text-align: left;
    width: 90%;
  }
  .right-tab {
    width: 90%;
  }
}
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console