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

Auto Save

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

              
                <head>
  <link href="https://fonts.googleapis.com/css?family=Cabin|Cabin+Sketch&display=swap" rel="stylesheet"> 
   <link href="https://fonts.googleapis.com/css?family=Lato&display=swap" rel="stylesheet"> 
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
  <title>Survey form project</title>
</head>
<body class="body">
  <h1 id="title">Survey Form</h1>
  <p id="description">This is a survey form to know what you think about our learning platform. It will take only a few minutes of your time. Thanks in advance and happy coding!</p>
  <hr>
  <form id="survey-form">
    <div class="form-group form">
      <label id="name-label" for="name">Name *</label>
      <input type="text" id="name" class="form-control" placeholder="Please enter your name here" required>
    </div>
    <div class="form-group form">
      <label id="email-label" for="email">Email *</label>
      <input type="email" id="email" class="form-control" placeholder="Please enter your email address here" required>
    </div>
    <div class="form-group form">
      <label id="number-label" for="number">Age</label>
      <input type="number" id="number" min="18" max="90" class="form-control" placeholder="Please enter your age here">
    </div>
      <div class="form-group form">
        <label for="dropdown">What is your favorite language?</label>
        <select id="dropdown" class="form-control">
          <option selected>Select a language</option>
          <option>HTML & CSS</option>
          <option>JavaScript</option>
          <option>Python</option>
          <option>PHP</option>
        </select>
      </div>
    <div class="form form-group">
      <label>What is your gender?</label>
      <br>
      <div class="form-check">
        <input class="form-check-input" type="radio" name="gender" value="man">
        <label for="gender" class="form-check-label"> Man</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="radio" name="gender" value="woman">
        <label class="form-check-label" for="gender"> Woman</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="radio" name="gender" value="other">
        <label class="form-check-label" for="gender"> Other</label>
      </div>
    </div>
    <div class="form-group form">
      <label class="form-check-label" for="checkbox">What do you think we should improve in the future?</label>
      <br>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="front-end">
        <label for="front-end" class="form-check-label"> Front-End Projects</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="back-end">
        <label for="back-end" class="form-check-label"> Back-end Projects</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="data">
        <label for="data" class="form-check-label"> Data Visualization</label>
      </div>
      <div class="form-check">
      <input class="form-check-input" type="checkbox" value="challenges">
        <label for="challenges" class="form-check-label"> Challenges</label>
      </div>
      <div class="form-check">
         <input class="form-check-input" type="checkbox" value="open-source">
        <label class="form-check-label" for="open-source"> Open Source Community</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="gitter">
        <label for="gitter" class="form-check-label"> Gitter help rooms</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="videos">
        <label for="videos" class="form-check-label"> Videos</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="meetups">
        <label for="meetups" class="form-check-label"> City Meetups</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="wiki">
        <label class="form-check-label"> Wiki</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="forum">
        <label for="forum" class="form-check-label"> Forum</label>
      </div>
      <div class="form-check">
        <input class="form-check-input" type="checkbox" value="additional-courses">
        <label for="additional-courses" class="form-check-label"> Additional Courses</label>
      </div>
    </div>
    <br>
    <div class="form-group form">
      <label for="comment">Do you have any other comment?</label>
      <textarea class="form-control" placeholder="Please type your comment here"></textarea>
    </div>
      <br>
      <button id="submit" type="submit" class="btn btn-success btn-lg">Submit</button>
  </form>
</body>
              
            
!

CSS

              
                .body {
  width: 98vw;
  height: auto;
  font-family: "Lato", sans-serif;
  font-size: 1.05em;
  margin: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#title {
  font-family: "Cabin Sketch", cursive;
  text-align: center;
  color: #A9D0F5;
  font-size: 50px;
}

#survey-form {
  background: #A9D0F5;
  width: 90%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justif-content: space-around;
  align-items: center;
}

.form {
  width: 80%;
}

.form > label {
  font-weight: bold;
}

.form-check {
  display: inline-block !important;
  margin-left: 10px;
}

#submit {
  margin: 15px 0;
  width: 180px;
}

@media screen and (min-width: 640px) {
  .form-group {
  padding: 5px 0;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console