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

              
                

<main>
  <h1 id="title">Survey Form</h1>
  
  
  <div id="form-wrapper">
    
   <form id="survey-form">
     <p id="description">Let us know a little bit more about you</p>
    <div class="rows">
      <div class="left">
        <label id="name-label" for="name">*Name</label>
      </div>
      <div class="right">
        <input id="name" type="text" name="name" placeholder="Enter your name" required>
      </div>
    </div>
     
   <div class="rows">
      <div class="left">
        <label id="email-label" for="email">*Email</label>
      </div>
      <div class="right">
        <input type="email" name="email" id="email" placeholder="Enter your email" required>
      </div>
    </div>
     
   <div class="rows">
      <div class="left">
        <label id="number-label" for="age">*Age</label>
      </div>
      <div class="right">
        <input type="number" name="age" id="number" min="1" max="150" placeholder="your age">
      </div>
    </div>
   
   <div class="rows">
      <div class="left">
        <label for="role">Which animal best describes your behavior?</label>
      </div>
      <div class="right">
        <select name="role" id="dropdown">
          <option disabled value>Select an option</option>
          <option value="student">Dog</option>
          <option value="full-time">Cat</option>
          <option value="learner">Fish</option>
          <option value="prefer">Bird</option>
          <option value="other">Other</option>
        </select>
      </div>
    </div>
     
    <div class="rows">
      <div class="left">
        <label for="recommend">*Would you be willing to take a new pet?</label>
      </div>
      <div class="right">
        <div class="buttons">
          <div class="radio">
            <label><input type="radio" name="recommend" value="definitely">  Definitely</label>
          </div>
          <div class="radio">
            <label><input type="radio" name="recommend" value="maybe">  Maybe</label>
          </div>
          <div class="radio">
            <label><input type="radio" name="recommend" value="not-sure">  Not sure</label>
          </div>
        </div>
      </div>
    </div>
     
     <div class="rows">
      <div class="left">
        <label for="like">What do you like the most about pets?</label>
      </div>
      <div class="right">
        <select name="like" id="dropdown">
          <option disabled value>Select an option</option>
          <option value="challenges">Cuddling</option>
          <option value="projects">Petting</option>
          <option value="community">Playing</option>
          <option value="open-source">Other</option>         
        </select>
      </div>
    </div>
     
   <div class="rows">
      <div class="left">
        <label class="checkbox-label">Which names do you think are cool for pets?
(Check all that apply):</label>
      </div>
      <div class="right">
        <input type="checkbox" class="form-check-input" id="front-end" value="front-end">
        <label class="form-check-label" for="front-end">Skippy</label>
        <input type="checkbox" class="form-check-input" id="back-end" value="back-end">
        <label class="form-check-label" for="back-end">Fluffy</label>
         <input type="checkbox" class="form-check-input" id="data-visualization" value="data-visualization">
        <label class="form-check-label" for="data-visualization">Beacky</label>
        <input type="checkbox" class="form-check-input" id="challenges" value="challenges">
        <label class="form-check-label" for="challenges">Mittens</label>
        <input type="checkbox" class="form-check-input" id="open-source" value="open-source">
        <label class="form-check-label" for="open-source">Steve French</label>
        <input type="checkbox" class="form-check-input" id="gitter" value="gitter">
        <label class="form-check-label" for="gitter">Paws</label>
        <input type="checkbox" class="form-check-input" id="videos" value="videos">
        <label class="form-check-label" for="videos">Buddy</label>
        <input type="checkbox" class="form-check-input" id="meetups" value="meetups">
        <label class="form-check-label" for="meetups">Lulu</label>
        <input type="checkbox" class="form-check-input" id="wiki" value="wiki">
        <label class="form-check-label" for="wiki">Bubbles</label>
        <input type="checkbox" class="form-check-input" id="forum" value="forum">
        <label class="form-check-label" for="forum">Sparky</label>
        <input type="checkbox" class="form-check-input" id="courses" value="courses">
        <label class="form-check-label" for="courses">Ace</label>
      </div>     
    </div>
     
   <div class="rows">
      <div class="left suggestions-label">
        <label id="suggestions" for="suggestions">Any comments or suggestions?</label>
      </div>
      <div class="right">
        <textarea class="textbox" rows="3" cols="30" name="suggestions" form="usrform">
Enter your comment here...</textarea>
      </div>
    </div>
     
   <input id="submit" type="submit" class="btn btn-info" value="submit">
  
      
      
      
    
   </form>
  </div>
  
  
</main>
              
            
!

CSS

              
                body{
  background-color: #6d81ad;  
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  
}

h1{
  color: white;
  font-weight: bold;
  letter-spacing: 2px;
} 

#description{
  color: darkbrown;
  padding-top: 30px;
  font-size: 18px;
}

form{
  background: url("http://www.gamesexchange.ca/images/backgrounds/paper-white-large.jpg");
  border-radius: 5px 20px 10px 25px;  
}

#form-wrapper{
  max-width: 900px;
  margin: 0 auto;
}

.rows{
 padding: 15px;
}

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

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

input[type=number],
input[type=text],
input[type=email],
select{
  height: 38px;
  width: 280px;
  padding: 5px;
  margin: 10px;
  border: 1px solid #c0c0c0;
  border-radius: 2px; 
}

 input[type=radio]
{
    border: 0px;
    width: auto;
    height: 0.8em;      
 }

.buttons{
  display: inline-block;
  text-align: left;
  width: 48%;
  padding-top: 15px;
  padding-left: 60px;  
}

input[type=checkbox]
{
    display: block;
    margin-left: 10px;
    margin-bottom: 10px;
    width: auto;
    height: 1em;     
 }

.form-check-label{
  margin-bottom: 10px;
  display: block;
  margin-left: 30px;
}

.checkbox-label{
  margin-top: -18px;
}

.radio{
  margin-left: -50px;
  padding: 3px 0;
}

.suggestions-label{
  margin-top: 0px;
}

.textbox{
  margin-left: 10px;
}

.btn{
  margin-bottom: 30px;
  padding: 10px 30px;
}

















              
            
!

JS

              
                
              
            
!
999px

Console