css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <html>
  
  <!-- Head --> 
  <head>
    <title>Survey Form FCC</title>
    <link href='https://fonts.googleapis.com/css?family=Roboto:700,300' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="style.css"/>
  </head>

  <body>
    
    <!-- Information -->
    <h1 id="title">Survey Form</h1>
    <div id="outer-form">
      <p>Let us know how to improve this form</p>
      <form id="survey-form" method="GET" action="">
    
    <div class="rowTab">
      <div class="labels">
        <label id="name-label" for="name">* Name: </label>
      </div>
      <div class="rightTab">
        <input autofocus type="text" name="name" id="name" class="input-field" placeholder="Enter your name" required>
      </div>
    </div>
    
    <div class="rowTab">
      <div class="labels">
        <label id="email-label" for="email">* Email</label>
      </div>
      <div class="rightTab">
        <input type="email" name="email" id="email" class="input-field" required placeholder="Enter your email">
      </div>
    </div>
    
    <div class="rowTab">
      <div class="labels">
        <label id="number-label" for="age">* Age</label>
      </div>
      <div class="rightTab">
        <input type="number" name="age" id="number" min="1" max="125" class="input-field" placeholder="age">
        </div>
    </div>
    
        <!-- Role question -->
    <div class="rowTab">
      <div class="labels">
        <label for="currentPos">Which option best describes your current role?<label>
      </div>
          <div class="rightTab">
            <select id="dropdown" name="currentPos" class="dropdown">
              <option disabled value>Select an option</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>
    
        <!-- reference section -->
        <div class="rowTab">
          <div class="labels">
            <label for="userRating">* How likely is it you refer this form to a friend?</label>
          </div>
          
          <div class="rightTab radio-inline">
            <ul style="list-style: none;">
              <li class="radio"><label><input name="radio-buttons" value="1" type="radio" class="userRatings"></label>Definitely</li>
              <li class="radio"><label><input name="radio-buttons" value="2" type="radio" class="userRatings"></label>Maybe</li>
              <li class="radio"><label><input name="radio-buttons" value="3" type="radio" class="userRatings">Not sure</label></li>
            </ul> 
        </div>
        </div>
            
        <!-- what do you like most -->
            <div class="rowTab">
              <div class="labels">
                <label for="most-like">What do you like most about this form?</label>
              </div>
              <div class="rightTab">
                <select id="most-like" name="mostLike" class="dropdown">
                  <option disabled selected value>Select an option</option>
                  <option value="challenges">Challenges</option>
                  <option value="projects">Projects</option>
                  <option value="community">Community</option>
                  <option value="openSource">Open Source</option>
                </select>
              </div>
            </div> 
            
      <!--improvement section -->
            <div class="rowTab">
              <div class="labels"><label for="preferences">Things that could be improved<br>(Check all that apply):</label>
            </div>
            <div class="rightTab">
              <ul id="preferences" style="list-style: none;">
                <li class="checkbox"><label><input name="prefer" value="1" type-"checkbox" class="userRatings">lorem ipsum 1</label></li>
                <li class="checkbox"><label class="checkbox"><input name="prefer" value="2" type="checkbox" class="userRatings"></label>lorum ipsum2</li>
                <li class="checkbox"><label class="checkbox"><input name="prefer" value="3" class="userRatings">lorem ipsum 3</label></li>
                <li class="checkbox"><label class="checkbox"><input name="prefer" value="4" class="userRatings"></label>lorem ipsum 4</li>
                <li class="checkbox"><label class="checkbox"><input name="prefer" value="5" class="userRatings"></label>lorem ipsum 5</li>
                <li class="checkbox">
                  <label class="checkbox"><input name="prefer" value="6" class="userRatings"></label>lorem ipsum 6</li>
              </ul>
            </div>
          </div>
          
          <!-- comments section -->
          <div class="rowTabs">
            <div class="labels">
              <label for="comments">Any comments or suggestions?</label>
            </div>
            <div class="rightTab">
              <textarea id="comments" class="input-field" style="height:50px;resize:vertical;" name="comment" placeholder="Please enter your comment here..."></textarea>
            </div>
          </div>
         
          <!-- Submit -->
          <button id="submit" type="submit">Submit</submit>
          
    </form>
      </div>
      </body>
      
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Raleway:400,500);

html, 
body {
  background-color: #a9d7d1;
  text-align: center;
  font-family: 'Raleway', helvetica, sans-serif;
  min-width: 320px;
}

header {
  font-size: 2em;
  font-weight: bold;
  margin: 20px;
  
}

#form-outer {
  background-color: rgb(250, 250, 250);
  margin: 0 auto;
  border-radius: 4px;
  width: 75%;
  max-width: 900px;
  padding: 10px;
  padding-top: 20px;
  
}

.input-field {
  height: 20px;
  width: 280px;
  padding: 5px;
  margin: 10px;
  border: 1px solid #c0c0c0;
  border-radius: 2px;
}

.rightTab {
  display: inline-block;
  text-align: left;
  width: 48%;
  vertical-align: middle;
}

.labels {
  display: inline-block;
  text-align: right;
  width: 40%;
  padding: 5px;
  vertical-align: top;
  margin-top: 10px;
}



.userRatings, 
input[type="checkbox"] {
  float: left;
  margin-right: 5px;
}

.radio-inline, input[type="checkbox"] {
  margin-left: 5px;
}

#submit {
  background-color: #59ace0;
  border-radius: 4px;
  color: white;
  font-size: 1em;
  height: 40px;
  width: 96px;
  margin: 10px;
  border: 0px solid;
  
}

.dropdown {
  height: 35px;
  width: 140px;
  padding: 5px;
  margin: 10px;
  margin-top: 15px;
  border: 1px solid #c0c0c0;
  border-radius: 2px;
}

.radio, .checkbox {
  position: relative;
  left: -43px;
  margin-left: 10px;
  display: block;
  padding-bottom: 10px;
    
}

@media screen and (max-width: 833px) {
  .input-field {
    width: 80%
  }
  select {
    width: 90%
  }
}

@media screen and (max-width: 520px) {
  .labels {
    width: 100%;
    text-align: left;
  }
  .rightTab {
    width: 80%;
    float: left;
  }
  .input-field {
    width: 100%;
  }
  select{
    width: 100%;
  }
}
            
          
!
            
              const projectName = 'survey-form';
localStorage.setItem('example_project', 'Survey Form')
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console