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. 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

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

              
                <body>
  <h1 id="title">Practice Survey Form</h1>
    <div class="main">
      <p id="description">I am practicing making a survey. Let me know what you think.</p>
      <form id="survey-form">
        
        <div class="label-side">
          <label id="name-label" for="name">* Name: </label>
        </div>
        <div class="input-side">
          <input id="name" type="text" placeholder="What do you like to be called?" required>
        </div>
        
        <div class="label-side">
          <label id="email-label" for="email">* E-mail: </label>
        </div>
        <div class="input-side">
          <input id="email" type="email" placeholder="Where's that digital mailbox?" required>
        </div>
        
        <div class="label-side">
          <label id="number-label" for="age">* Age: </label>
        </div>
        <div class="input-side">
          <input id="number" type="number" min="1" max="120" placeholder="Age?" required>
        </div>
        
        
        <div class="label-side">
          <label for="select">What's your favorite Borderlands game: </label>
        </div>
        <div class="input-side">
          <select name="dropdown" id="dropdown">
            <option value="Pick one" disabled>Dude you've gotta pick one</option>
            <option value="B1">Borderlands 1</option>
            <option value="B2">Borderlands 2</option>
            <option value="BPre">Borderlands the PreSequel</option>
            <option value="All">Holy smokes I can't pick one! ALL!</option>
          </select>
        </div>
          
        <div class="label-side">
          <label for="marg">Do you want a margarita?: </label>
        </div>
        <div class="input-side">
          <input type="radio" name="margarita" value="yes">Yes.
          <input type="radio" name="margarita" value="yas">Yaaaasssss.
          <input type="radio" name="margarita" value="yep">Yep.
        </div>
        
        <div class="label-side">
          <label for="checkbox">What features are you looking for in a beanbag chair?: <br>(Check all that apply) <br><br><br></label>
        </div>
        <div class="input-side">
          <input type="checkbox" name="feature1" value="soft"> Ultra soft fabric<br>
          <input type="checkbox" name="feature2" value="huge"> Senselessly large<br>             <input type="checkbox" name="feature3" value="cups"> Cupholders<br>
          <input type="checkbox" name="feature4" value="tv"> Built in TV<br>
          <input type="checkbox" name="feature5" value="massage"> Massaging arms
        </div>
        
        <div class="label-side">
          <label for="comments">What do you have to say for yourself?: <br><br><br><br></label>
        </div>
        <div class="input-side">
          <textarea name="message" placeholder="...Well???"></textarea>
        </div>
        
        <div id="submit-container">
          <input id="submit" type="submit" value="Submit">
        </div>        
      </form>
    </div>
</body>
              
            
!

CSS

              
                * {
  padding: 0;
  margin: 0;
  font-family: 'Encode Sans Condensed', sans-serif;
  box-sizing: border-box;
}

body {
  background-color: rgb(9,170,170);
}

#title {
  text-align: center;
  padding: 10px;
}

.main {
  width: 70%;
  margin: 15px auto;
  background-color: white;
  box-shadow: 13px 9px 0 rgba(0,0,0,0.1);
  border-radius: 3px;
  padding: 25px 0;
}

p {
  text-align: center;
  padding: 20px;
}

#survey-form {
  margin: 0 auto;
}

.label-side {
  width: 48%;
  text-align: right;
  display: inline-block;
  padding: 10px 0;
  font-size: 18px;
  vertical-align: middle;
}

.input-side {
  width: 48%;
  text-align: left;
  display: inline-block;
  padding: 10px;
  vertical-align: middle;
  
}

input[type=text] {
  width: 100%;
  font-size: 16px;
  border-radius: 3px;
}

input[type=email] {
  width: 100%;
  font-size: 16px;
  border-radius: 3px;
}
input[type=number] {
  max-width: 65px;
  font-size: 16px;
  border-radius: 3px;
}

select {
  font-size: 16px;
  width: 100%;
}

input[type=radio] {
  margin-left: 10px;
  margin-right: 2px;
}
input[type=radio]:first-child {
  margin-left: 0;
}

input[type=checkbox] {
  padding: 5px;
}

textarea {
  width: 100%;
  height: 85px;
  font-size: 16px;
}

#submit-container {
  text-align: center;
}

#submit {
  color: white;
  font-size: 18px;
  padding: 15px 35px;
  background-color: rgb(13,115,115);
  border-radius: 3px;
  cursor: pointer;
  transition: .4s;
}

#submit:hover {
  background-color: rgb(13,135,145);
  border: 2px solid rgb(13,115,115);
  box-shadow: 3px 10px 1px rgba(0,0,0,0.4);
}
              
            
!

JS

              
                
              
            
!
999px

Console