Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

<main id="main">
  <div id="form-container">
    <h1 id="title">Channel Survey Form</h1>
    <p id="description">Hi, Thanks for visiting my channel and this survey will help to improve the channel</p>
    <form action="/" id="survey-form">
      <div class="row">
        <div class="labels">
          <label id="name-label" for="name">Name: </label>
        </div>
        <div class="input-elm">
          <input id="name" type="text" placeholder="Please enter your name" required/>
        </div>
      </div>
      <div class="row">
        <div class="labels">
          <label id="email-label" for="email">Email: </label>
        </div>
        <div class="input-elm">
          <input id="email" type="email" placeholder="Please enter your email" required/>
        </div>
      </div>
      <div class="row">
        <div class="labels">
          <label id="number-label" for="number">Age: </label>
        </div>
        <div class="input-elm">
          <input id="number" type="number" min="8" max="100" placeholder="Please enter your age" />
        </div>
      </div>
      <div class="row">
        <div class="labels">
          <label for="visit">How often do you visit the channel? :</label>
        </div>
        <div class="input-elm">
          <select name="visit" id="dropdown">
            <option value="every-hour">Every hour</option>
            <option value="daily">Daily</option>
            <option value="two-days">Every two days</option>
            <option value="weekly">Weekly</option>
            <option value="new-video">Every new video</option>
            <option value="bi-weekly">Bi-weekly</option>
            <option value="never">Never</option>
          </select>
        </div>
      </div>
      <div class="row">
        <div class="labels">
          <label id="experience-label" for="experience">What's your experience so far with the channel?: </label>
        </div>
        <div class="input-elm">
          <label><input type="radio" name="experience"  value="Bad"/> Bad</label>
          <label><input type="radio" name="experience" value="Good"/> Good</label>
          <label><input type="radio" name="experience"  value="Great"/> Great</label>
          <label><input type="radio" name="experience" value="Awesome"/> Awesome</label>
        </div>
      </div>
      <div class="row">
        <div class="labels">
          <label id="experience-label" for="experience">How do you rate my channel on the scale of 1 to 5? : </label>
        </div>
        <div class="input-elm">
          <label><input type="radio" name="rating" value="1"/> 1</label>
          <label><input type="radio" name="rating" value="2"/> 2</label>
          <label><input type="radio" name="rating" value="3"/> 3</label>
          <label><input type="radio" name="rating" value="4"/> 4</label>
          <label><input type="radio" name="rating" value="5"/> 5</label>
        </div>
      </div>
      <div class="row">
        <div class="labels">
          <label for="like">What do you like about the channel so far? : </label>
        </div>
        <div class="input-elm likes">
          <label><input type="checkbox" value="Me"> Me :)</label><label><input type="checkbox" value="Education"> Educations videos</label>
          <label><input type="checkbox" value="Songs"> Songs</label>
          <label><input type="checkbox" value="Tutorials"> Tutorials</label>
          <label><input type="checkbox" value="Vlogs"> Vlogs</label>
          <label><input type="checkbox" value="Rant"> Rant</label>
          <label><input type="checkbox" value="Reaction"> Reaction</label>
          <label><input type="checkbox" value="Funny Videos"> Funny videos</label>
          <label><input type="checkbox" value="Reviews"> Reviews</label>
          <label><input type="checkbox"  value="Commentries"> Commetries</label>
        </div>
      </div>

      <div class="row">
        <div class="labels">
          <label for="like">What contents would you like to see in future? : </label>
        </div>
        <div class="input-elm likes">
          <label><input type="checkbox" value="Education"> Educations videos</label>
          <label><input type="checkbox" value="Songs"> Songs</label>
          <label><input type="checkbox" value="Tutorials"> Tutorials</label>
          <label><input type="checkbox" value="Vlogs"> Vlogs</label>
          <label><input type="checkbox" value="Rant"> Rant</label>
          <label><input type="checkbox" value="Reaction"> Reaction</label>
          <label><input type="checkbox" value="Funny Videos"> Funny videos</label>
          <label><input type="checkbox" value="Reviews"> Reviews</label>
          <label><input type="checkbox"  value="Commentries"> Commetries</label>
        </div>
      </div>
      <div class="row">
        <div class="labels">
          Any suggestions for the channel? : 
        </div>
        <div class="input-elm">
          <textarea name="" id="" cols="40" rows="5" placeholder="(Optional)"></textarea>
        </div>
      </div>
      <div class="row">
        <div class="labels"></div>
        <div class="input-elm">
          <p id="thanks">Thanks for participating in the survey</p>
        </div>
      </div>
      <div class="row">
        <div class="labels"></div>
        <div class="input-elm">
          <button id="submit" type="submit">Submit</button>
        </div>
      </div>
    </form>
  </div>
</main>
              
            
!

CSS

              
                body {
  font-family: 'Open Sans', sans-serif;
  line-height: 2rem;
}
input, textarea, select, button {
  font-size: 1rem;
}
#title, #description {
  text-align: center;
}
#form-container {
  width: 100%;
  margin: 5rem auto;
  padding: 1rem;
  background-color: hsl(200, 99%, 99%);
  box-shadow: 0px 0px 50px 3px rgba(0,0,0,.3); 
}
.row, input {
  padding: .425rem;
}
.labels {
  margin-right: 1rem;
}

input[type=text],
input[type=number], 
input[type=email] {
  width: 90%;
}

button {
  width: 80%;
  padding: 1rem;
}

.likes label {
  display: block;
}

@media (min-width: 600px) {
  .labels {
    display: inline-block;
    width: 40%;
    text-align: right;
    vertical-align: top;
  }
  .input-elm {
    display: inline-block;
    width: 48%;
  }
  #form-container {
    width: 80%;
  }
  textarea {
    width: 100%;
  }
}
              
            
!

JS

              
                // coded by @SamAI-Software
const projectName = 'survey-form';
localStorage.setItem('example_project', 'Survey Form');
              
            
!
999px

Console