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

              
                
<h1 id="title">
  freeCodeCamp Survey Form
</h1>
<p id="description"><i>Thank you for taking the time to help us imrpove the platform</i></p>

<form action="" id="survey-form">
  <div class="form-control">
    <label for="name" id="name-label">Name</label>
    <input type="text" id="name" placeholder="Enter a name" required />
  </div>

  <div class="form-control">
    <label for="email" id="email-label">Email</label>
    <input type="email" id="email" placeholder="Enter a email" required/>
  </div>

  <div class="form-control">
    <label for="number" id="number-label">Age</label>
    <input type="number" id="number" placeholder="Enter your age" required min="10" max="99"/>
  </div>
  
  <div class="form-control">
    <label for="role">Which option best describes your current role?</label>
    <select name="role" id="dropdown">
      <option value="student">Student</option>
      <option value="full-time">Full-time</option>
      <option value="part-time">Part-time</option>
      <option value="other">Other</option>
    </select>
  </div>
  
  <div class="form-control">
    <label>Would you recommend feeCodeCamp to a friend?</label>
    
    <label for="recommend-1"><input type="radio" id="recommend-1" name="recommend" value="definitely"/>Definitely</label>
    <label for="recommend-2"><input type="radio" id="recommend-2" name="recommend" value="maybe"/>Maybe</label>
    <label for="recommend-3"><input type="radio" id="recommend-3" name="recommend" value="not-sure"/>Not sure</label>
  </div>
  
    <div class="form-control">
    <label for="feature"> What is your favorite feature of freeCodeCamp?</label>
    <select name="feature" id="feature">
      <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 class="form-control">
    <label>What would you like to see improved? <small>(Check all that apply)</small></label>
    
    <label for="improve-1"><input type="checkbox" name="improve" id="improve-1" value="improve-1" />Front-end Projects</label>
    <label for="improve-2"><input type="checkbox" name="improve" id="improve-2" value="improve-2" />Back-end Projects</label>
    <label for="improve-3"><input type="checkbox" name="improve" id="improve-3" value="improve-3" />Data Visualization</label>
    <label for="improve-4"><input type="checkbox" name="improve" id="improve-4" value="improve-4" />Challenges</label>
    <label for="improve-5"><input type="checkbox" name="improve" id="improve-5" value="improve-5" />Open Source Community</label>
    <label for="improve-6"><input type="checkbox" name="improve" id="improve-6" value="improve-6" />Gitter help rooms</label>
    <label for="improve-7"><input type="checkbox" name="improve" id="improve-7" value="improve-7" />Videos</label>
    <label for="improve-8"><input type="checkbox" name="improve" id="improve-8" value="improve-8" />City Meetups</label>
    <label for="improve-9"><input type="checkbox" name="improve" id="improve-9" value="improve-9" />Wiki</label>
    <label for="improve-10"><input type="checkbox" name="improve" id="improve-10" value="improve-10"/>Forum</label>
    <label for="improve-11"><input type="checkbox" name="improve" id="improve-11" value="improve-11"/>Additional Courses</label>
  </div>
  
  <div class="form-control">
    <label for="comments">
    Any comments or suggestions?
  </label>
    <textarea name="comments" id="comments" placeholder="Enter your comment here..."></textarea>
  </div>
  
  <button type="submit" id="submit">Submit</submit>
</form>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
* {
  box-sizing: border-box;
}

body {
  background-color: #05c46b;
  font-family: 'Poppins', san-serif;
  text-align: center;
  margin: 0;
}

h1 {
  margin-bottom: 0;
}

h1 + p {
  margin-top: 0;
}

form {
  background-color: #fff;
  box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  padding: 30px 20px;
  max-width: 450px;
  margin: 40px auto;
}

.form-control {
  margin-bottom: 20px;
  text-align: left;
}

.form-control label {
  display: block;
  margin-bottom: 6px;
}

.form-control input, 
.form-control select,
.form-control textarea {
  border: 1px solid #777;
  border-radius: 2px;
  font-family: inherit;
  padding: 10px;
  display: block; 
  width: 100%;
}

.form-control select {
  height: 40px;
}

.form-control input[type="radio"], 
.form-control input[type="checkbox"] {
  display: inline-block;
  width: auto;
}

button {
  background-color: #05c46b;
  border: 1px solid #777;
  border-radius: 2px;
  font-family: inherit;
  font-size: 14px; 
  padding: 10px;
  width: 70%;
  justify-content: center;
}
              
            
!

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