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

              
                 
    <div class="container">
      <div class="header">
        <h1 id="title">FreeCodeCamp Survey Form</h1>
        <p id="description">
          Thank you for taking the time to help us improve our platform
        </p>
      </div>
      <div class="form">
        <form id="survey-form" action="#">
          <div class="form-group">
            <label for="name" id="name-label">Name</label>
            <input
              type="text"
              name="name"
              id="name"
              placeholder="Enter your name"
                   required
            />
          </div>
          <div class="form-group">
            <label for="email" id="email-label">Email</label>
            <input
              type="email"
              name="email"
              id="email"
              placeholder="Enter your email"
                   required
            />
          </div>
          <div class="form-group">
            <label for="number" id="number-label">Phone</label>
            <input
              type="tel"
              name="phone"
              id="phone"
              placeholder="Enter phone Number"
            />
          </div>
          <div class="form-group">
            <label for="age">Age (optional)</label>
            <input
              type="number"
              name="age"
              id="number"
                   placeholder="Age"
              min="16"
              max="45"
              step="1"
              value="16"
            />
          </div>
          <div class="form-group">
            <p>Which option best describes your current role?</p>
            <select name="role" id="dropdown">
              <option disabled selected value="">Select current role</option>
              <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="freelance">Freelance</option>
              <option value="prefer not to say">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>
            <input type="radio" name="recommend" id="rec1" value="definately" />
            <label for="definately">Definately</label> <br />
            <input type="radio" name="recommend" id="rec2" value="maybe" />
            <label for="maybe">Maybe</label><br />
            <input type="radio" name="recommend" id="rec3" value="not sure" />
            <label for="not-sure">Not sure</label>
          </div>
          <div class="form-group">
            <p>What is your favorite feature of freeCodeCamp</p>
            <select name="favfeature" id="dropdown">
              <option disabled selected value>Select an option</option>
              <option value="curriculum">Curriculum</option>
              <option value="challenge">Challenges</option>
              <option value="project">Projects</option>
              <option value="community">Community</option>
              <option value="open source">Open source</option>
            </select>
          </div>
          <div class="form-group">
            <p>
              What would you like to see improved?
              <em>(check all the apply)</em>
            </p>
            <input
              type="checkbox"
              name="improve1"
              id="improve1"
              value="Front-end-project"
            />
            <label for="front-end-project">Fron-end Project</label><br />
            <input
              type="checkbox"
              name="improve2"
              id="improve2"
              value="Back-end-project"
            />
            <label for="back-end-project">Back-end Project</label><br />
            <input
              type="checkbox"
              name="improve3"
              id="improve3"
              value="Data visualization"
            />
            <label for="data visualization">Data Visualization</label><br />
            <input
              type="checkbox"
              name="improve4"
              id="improve4"
              value="challenges"
            />
            <label for="challenge">Challenges</label><br />
            <input
              type="checkbox"
              name="improve5"
              id="improve5"
              value="open-source-community"
            />
            <label for="open-source-community">Open Sourch Community</label
            ><br />
            <input
              type="checkbox"
              name="improve6"
              id="improve6"
              value="gitter-help"
            />
            <label for="gitter-help">Gitter help rooms</label><br />
            <input
              type="checkbox"
              name="improve7"
              id="improve7"
              value="videos"
            />
            <label for="videos">Video</label><br />
            <input
              type="checkbox"
              name="improve8"
              id="improve8"
              value="city-meetup"
            />
            <label for="city-meetup">City Meetups</label><br />
            <input type="checkbox" name="improve9" id="improve9" value="wiki" />
            <label for="wiki">Wiki</label><br />
            <input
              type="checkbox"
              name="improve10"
              id="improve10"
              value="forum"
            />
            <label for="forum">Forum</label><br />
            <input
              type="checkbox"
              name="improve11"
              id="improve11"
              value="additional course"
            />
            <label for="additional-course">Additional Courses</label><br />
          </div>
          <div class="form-group">
            <p>Any comments or suggestions?</p>
            <textarea
              name="comments"
              id="comments"
              cols="30"
              rows="10"
              class="input-textarea"
              placeholder="Enter your comment here...."
            ></textarea>
            <div class="form-group">
              <input type="submit" name="submit" id="submit" />
            </div>
          </div>
        </form>
      </div>
    </div>
  

              
            
!

CSS

              
                body {
  margin: 0 auto;
  font-family: monospace;
  background-color: #00b386;
}

.container {
  margin: 10%;
  background-color: #e6fff9;
  border-radius: 5%;
}

.header {
  text-align: center;
  padding: 8px;
}

#title {
  font-size: 3rem;
  font-weight: 600;
}

#description {
  font-family: sans-serif;
  font-size: 1.5rem;
  font-weight: 200;
  font-style: italic;
}

.form {
  padding: 24px 40px;
  font-size: 22px;
  font-weight: 300;
  background-color: white;
}

.form-group {
  margin: 18px;
}

input[type="text"],
[type="number"],
[type="email"],
[type="tel"] {
  width: 100%;
  padding: 12px;
  height: 28px;
  font-size: 18px;
  border-radius: 10px;
}
select {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  height: 50px;
  border-radius: 10px;
}
input[type="checkbox"] {
  margin: 8px;
  
}

textarea {
  width: 100%;
  border-radius: 10px;
  font-size: 24px;
}

input[type="submit"] {
  width: 100%;
  padding: 16px;
  font-size: 28px;
  font-weight: 400;
  border-radius: 10px;
  background-color: #00cc99;
  color: white;
}

              
            
!

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