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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<div id="heading">
      <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="form-container">
      <form id="survey-form" action="/submit-survey-from">
        <label class="question" for="name">Name</label>
        <input
          id="name"
          type="text"
          name="name"
          placeholder="Enter your name"
          required
        />

        <label class="question" for="email">Email</label>
        <input
          id="email"
          type="email"
          name="email"
          placeholder=" Enter your Email"
        />

        <label class="question" for="number">Age (optional)</label>
        <input
          id="number"
          type="number"
          name="number"
          min="10"
          max="99"
          placeholder="Age"
        />

        <label class="question" for="role"
          >Which option best describes your current role?</label
        >
        <select id="role" name="role">
          <option value="" selected disabled>Select current role</option>
          <option value="student">Student</option>
          <option value="fulltime-job">Fulltime Job</option>
          <option value="fulltime-learner">Fulltime Learner</option>
          <option value="prefer-not-to-say">Prefer not to say</option>
          <option value="Oother">Other</option>
        </select>

        <p class="question">
          Would you recommend freeCodeCamp to a friend?
        </p>
        <label class="question" for="definitely">
          <input type="radio" name="referral" id="definitely" />
          Definitely
        </label>
        <label class="question" for="maybenot">
          <input type="radio" name="referral" id="maybenot" />
          May be not
        </label>

        <label class="question" for="sure">
          <input type="radio" name="referral" id="sure" />
          Sure</label
        >

        <label class="question" for="fav"
          >What would you like to see improved? (Check all that apply)</label
        >

        <select id="fav" name="fav">
          <option value="" selected disabled>Select an option</option>
          <option value="challenges">Challenges</option>
          <option value="projects">Projects</option>
          <option value="Community">Community</option>
          <option value="opensource">Opensource</option>
        </select>

        <p class="question">What is your favorite feature of freeCodeCamp?</p>
        <label class="question" for="front-end">
          <input
            type="checkbox"
            name="feature"
            id="front-end"
            value="front-end"
          />
          Front-end Projects</label
        >

        <label class="question" for="back-end">
          <input type="checkbox" name="feature" id="backend" value="back-end" />
          Back-end Projects
        </label>
        <label class="question" for="datav">
          <input type="checkbox" name="feature" id="datav" value="datav" />
          Data Visualization Challenges
        </label>

        <label class="question" for="challenge">
          <input
            type="checkbox"
            nname="feature"
            id="challenge"
            valule="challenge"
          />
          Challenges
        </label>

        <label class="question" for="opens">
          <input type="checkbox" name="feature" id="opens" value="opens" /> OPen
          Source Community</label
        >

        <label class="question" for="gitterh">
          <input type="checkbox" name="feature" id="gitterh" value="gitterh" />
          Gitter help rooms
        </label>
        <label class="question" for="meetup">
          <input type="checkbox" name="feature" id="meetup" value="meetup" />
          Videos City Meetups
        </label>
        <label class="question" for="wiki">
          <input type="checkbox" name="feature" id="wiki" value="wiki" />
          Wiki
        </label>
        <label class="question" for="forum">
          <input type="checkbox" name="feature" id="forum" value="forum" />
          Forum
        </label>
        <label class="question" for="addlc">
          <input type="checkbox" name="feature" id="addlc" value="addlc" />
          Additional Courses
        </label>

        <label class="question" for="comments"
          >Any comments or suggestions?</label
        >
        <textarea
          id="comments"
          name="comments"
          placeholder="Enter your comment here..."
        ></textarea>
        <button type="submit">Submit</button>
      </form>
    </div>
              
            
!

CSS

              
                html {
  color: rgba(229, 232, 235, 0.8);
  font-family: Tahoma, Arial, Helvetica, sans-serif;
}

body {
  background: linear-gradient(rgba(63, 74, 160, 0.8), rgba(63, 74, 160, 0.8)),
    url(https://i.postimg.cc/7Y5965Qg/survey-form-background.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  text-align: center;
}

#heading {
  margin: auto;
}

#title {
  font-size: 26px;
  font-weight: 500;
  font-style: normal;
  font-stretch: semi-expanded;
  margin-top: 50px;
}

#description {
  font-style: italic;
  font-size: 14px;
  margin-top: -5px;
  margin-bottom: 30px;
}

#form-container {
  width: 30%;
  margin: auto;
  background-color: rgba(39, 39, 67, 0.8);
  text-align: left;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 550;
  padding: 30px 40px 50px 40px;
}

label {
  display: block;
  clear: both;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  margin-top: 10px;
  margin-bottom: 10px;
  height: 30px;
  width: 100%;
  border-radius: 5px;
  padding-left: 10px;
}

textarea {
  height: 150px;
}

button {
  margin-top: 5px;
  display: block;
  height: 35px;
  width: 100%;
  background-color: rgb(14, 190, 99);
  color: whitesmoke;
}

@media screen and (max-width: 1200px) {
  #form-container {
    width: 90%;
    margin: auto;}
}

              
            
!

JS

              
                
              
            
!
999px

Console