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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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>

<div id="form-container">
  <div id="header">
    <h1 id="title">freeCodeCamp Survey Form</h1>
    <p id="description">Thank you for taking the time to help us improve the platform</p>
  </div>
  <div id="footer">
    <form id="survey-form" action="/survey-form">
      <div class="form-group">
        <label id="name-label" for="name">Name</label>
        <input type="text" id="name" placeholder="Enter Your Name, e.g. Akash Raj" required>
      </div>
      <div class="form-group">
        <label id="email-label" for="email">Email</label>
        <input type="email" id="email" placeholder="Enter Your Email, e.g. test@test.com" required>
      </div>
      <div class="form-group">
        <label id="number-label" for="number">Age</label>
        <input type="number" id="number" placeholder="Enter Your Age" min="11" max="100" required>
      </div>
      <div class="form group">
        <p>Which option describe your current role?</p>
        <select id="dropdown" name="role" required>
          <option disabled selected value>Select Current Role</option>
          <option value="student">Student</option>
          <option value="job">Full Time Job</option>
          <option value="learner">Full Time Learner</option>
          <option value="preferNo">Prefer Not to Say</option>
          <option value="other">Other</option>
        </select>
      </div>
      <div class="form-group">
        <p>Would you recommend freeCodeCamp to a friend?</p>
        <label for="radio1">
          <input type="radio" id="radio1" name="recommend" value="definetly" checked>Definetly</input>
        </label>
        <label for="radio2">
          <input type="radio" id="radio2" name="recommend" value="maybe">Maybe</input>
        </label>
        <label for="radio3">
          <input type="radio" id="radio3" name="recommend" value="not-sure">Not sure</input>
        </label>
      </div>
      <div class="form-group">
        <p>What would you like to see improved? (Check all that apply)</p>
        <label for="checkbox1">
          <input type="checkbox" id="checkbox1" name="improved" value="front-end">Front-end Projects</input>
        </label>
        <label for="checkbox2">
          <input type="checkbox" id="checkbox2" name="improved" value="back-end">Back-end Projects</input>
        </label>
        <label for="checkbox3">
          <input type="checkbox" id="checkbox3" name="improved" value="data-visulization">Data Visualization</input>
        </label>
        <label for="checkbox4">
          <input type="checkbox" id="checkbox4" name="improved" value="challenges">Challenges</input>
        </label>
        <label for="checkbox5">
          <input type="checkbox" id="checkbox5" name="improved" value="open-source">Open Source Community</input>
        </label>
        <label for="checkbox6">
          <input type="checkbox" id="checkbox6" name="improved" value="gitter-help">Gitter Help Rooms</input>
        </label>
        <label for="checkbox7">
          <input type="checkbox" id="checkbox7" name="improved" value="videos">Videos</input>
        </label>
        <label for="checkbox8">
          <input type="checkbox" id="checkbox8" name="improved" value="city-meetups">City Meetups</input>
        </label>
        <label for="checkbox9">
          <input type="checkbox" id="checkbox9" name="improved" value="wiki">Wiki</input>
        </label>
        <label for="checkbox0">
          <input type="checkbox" id="checkbox0" name="improved" value="forum">Forum</input>
        </label>
        <label for="checkbox11">
          <input type="checkbox" id="checkbox11" name="improved" value="additional-courses">Additional Courses</input>
        </label>
      </div>
      <div class="form-group">
        <p>Any Comment or suggestions</p>
        <textarea name="comment" form="survey-form" placeholder="Write Your Comment Here...."></textarea>
      </div>
      <div class="form-group">
        <button type="submit" id="submit">Submit</button>
      </div>
    </form>
  </div>
</div>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=PT+Sans|Sen&display=swap');

body {
  margin: 0;
  font-family: Sen, 'PT Sans', sans-serif;
  background: linear-gradient(135deg, #235, #aaa);
  color: rgba(255, 255, 255, 0.8);
}

#form-container {
  width: 50vw;
  margin: 5em auto;
}

#header {
  text-align: center;
}

#footer {
  background: rgba(236, 201, 240, 0.2);
  padding: 2em;
  border-radius: 1em;
  font-size: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

#name-label, #email-label, #number-label {
  margin-bottom: 1em;
}

#name, #email, #number, #dropdown, #submit, textarea, #submit {
  padding: 10px;
  margin-bottom: 2em;
}

#dropdown {
  min-width: 100%;
}

#number {
  width: 94%;
}

textarea {
  height: 7rem;
}

#submit {
  border: 0;
  background-color: green;
  color: rgba(255, 255, 255, 0.8);
}

@media only screen and (max-width: 380px){
  #form-container {
    width: 100vw;
  }
  #footer {
    border: 0;
    width: 60%;
    backgrond: transparent;
    margin: 0 auto;
  }
  #name, #email, #number, #dropdown, #submit, textarea, #submit

}
              
            
!

JS

              
                
              
            
!
999px

Console