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

              
                <html>

<head>
  <title>Music Survey</title>
</head>

<body>
  <div class="container rounded m-4 mx-auto">
    <h1 class="display-3 p-3" id="title">Music Survey</h1>
    <p id="description">Which kind of music fan are you?</p>

    <form autocomplete="on" id=survey-form>
      <div class="row">
        <div class="col-sm m-3">
          <label class="bold" id="name-label" for="name">Name:</Label>
          <input id="name" class="form-control" type="text" placeholder="Your Name" required>
        </div>
        <div class="col-sm m-3">
          <label class=bold id=email-label for="email">E-Mail:</Label>
          <input id="email" class="form-control" type="email" placeholder="Your E-Mail" required>
        </div>
      </div>
      <div class="row">
        <div class="col-sm m-3">
          <label class=bold id=number-label for="number">How many shows have you seen last year?</label>
          <input id=number class="form-control" type="number" placeholder="Number of Shows" min="0" max="365" autocomplete="off">
        </div>
        <div class="col-sm m-3 align-self-end">
          <label class=bold for="style">Your favorite style of Music</label>
          <select id="dropdown" class="form-control" id="style">
              <option>Rock</option>
              <option>Pop</option>
              <option>Jazz</option>
              <option>Rap</option>
            </select>
        </div>
      </div>

      <div class="row m-3">
        <div class="col">
          <label class=bold>What's your haircut like?</label>
          <div class="form-check">
            <input class="form-check-input" id=bold type="radio" name=haircut value="0">
            <label class="form-check-label" for=bold>Bold
             </label>
          </div>

          <div class="form-check">
            <input class="form-check-input" id=Mohawk type="radio" name=haircut value="0">
            <label class="form-check-label" for="Mohawk">Mohawk
            </label>

          </div>

          <div class="form-check">
            <input class="form-check-input" id=long type="radio" name=haircut value="0">
            <label class="form-check-label" for=long>Long Hair
            </label>
          </div>
          <div class="form-check">
            <input class="form-check-input" id=other type="radio" name=haircut value="0">
            <label class="form-check-label" for=other>Other
            </label>
          </div>
        </div>

        <div class="col">
          <label class=bold>Do you know these bands?</label>
          <div class="form-check">
            <input class="form-check-input" id=clash type="checkbox" name=haircut2 value="0">
            <label class="form-check-label" for=clash>The Clash
             </label>
          </div>

          <div class="form-check">
            <input class="form-check-input" id=sexpistols type="checkbox" name=haircut2 value="0">
            <label class="form-check-label" for="sexpistols">Sex Pistols
            </label>
          </div>
          <div class="form-check">
            <input class="form-check-input" id=pogues type="checkbox" name=haircut2 value="0">
            <label class="form-check-label" for=pogues>The Pogues
            </label>
          </div>
          <div class="form-check">
            <input class="form-check-input" id=none type="checkbox" name=haircut2 value="0">
            <label class="form-check-label" for=none>None of the above
            </label>
          </div>
        </div>

      </div>
      <div class="d-flex justify-content-center m-3">
        <div class="col-lg-6">
          <label for=lyrics class=bold>
            What are your favorite Lyrics?
              </label>

          <textarea id=lyrics class="form-control" maxlength="140"></textarea>
        </div>
      </div>

      <div class="d-flex justify-content-center">
        <button id="submit" class="btn btn-primary btn-lg mb-3" type="submit">Submit!</button>

      </div>

    </form>
  </div>
  </div>
</body>

</html>
              
            
!

CSS

              
                body {
  font-family: 'Lato', sans-serif;
  
}

  h1 {
  font-family: 'Anton', sans-serif;
  text-align: center;
  text-transform: uppercase;
}

.bold {
  font-weight: bold;
}

#description {
  text-align: center;
}

.container {
  background: gray;
}


              
            
!

JS

              
                
              
            
!
999px

Console