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

              
                <main>
  <header>
    <h1 id="title">Library Survey</h1>
  
    <p id="description">Help us improve your local library!</p>
  </header>
  
  <form id="survey-form">
    <div class="form-group">
      <label id="name-label" for="name">Name</label>
      <input
        type="text"
        name="name"
        id="name"
        class="form-control"
        placeholder="Enter your name"
        required/>
    </div>
    
    <div class="form-group">
      <label id="email-label" for="email">Email</label>
      <input
        type="email"
        name="email"
        id="email"
        class="form-control"
        placeholder="Enter your email"
        required/>
    </div>    

    <div class="form-group">
      <label id="number-label" for="number">Age</label>
      <input
        type="number"
        name="age"
        id="number"
        min="8"
        max="105"
        class="form-control"
        placeholder="Age"
        required/>
    </div>       
    
    <div class="form-group">
      <p>How often do you visit the library?</p>
      <select id="dropdown" name="role" class="form-control" required>
        <option disabled selected value>Select</option>
        <option value="daily">Daily</option>
        <option value="week-several">Several times a week</option>
        <option value="week-once">Once a week</option>
        <option value="month-several">Several times a month</option>
        <option value="month-once">Once a month</option>
      </select>
    </div>
    
    <div class="form-group">
      <p>When you visit, are you usually able to find what you are looking for?</p>
      <label>
        <input
          name="accessibility"
          value="always"
          type="radio"
          class="input-radio"
          checked
        />Always</label>
      <label>
        <input
          name="accessibility"
          value="sometimes"
          type="radio"
          class="input-radio"
        />Sometimes</label>
      <label>
        <input
          name="accessibility"
          value="rarely"
          type="radio"
          class="input-radio"
        />Rarely</label>      
      <label>
        <input
          name="accessibility"
          value="never"
          type="radio"
          class="input-radio"
        />Never</label>
      
    <div class="form-group">
      <p>Do you usually find the books and other materials that you are looking for in the library?</p>
      <label>
        <input
          name="accessibility2"
          value="always"
          type="radio"
          class="input-radio"
          checked
        />Always</label>
      <label>
        <input
          name="accessibility2"
          value="sometimes"
          type="radio"
          class="input-radio"
        />Sometimes</label>
      <label>
        <input
          name="accessibility2"
          value="rarely"
          type="radio"
          class="input-radio"
        />Rarely</label>
      <label>
        <input
          name="accessibility2"
          value="never"
          type="radio"
          class="input-radio"
        />Never</label>
      
    <div class="form-group">
      <p>Please check all of the reasons you visit the library:
        <span class="clue">(Check all that apply)</span>
      </p>

      <label
        ><input
          name="reasons"
          value="check/return"
          type="checkbox"
          class="input-checkbox"
        />to check out / return books</label>
      <label>
        <input
          name="reasons"
          value="computers"
          type="checkbox"
          class="input-checkbox"
        />to use the computers</label>
      <label>
        <input
          name="reasons"
          value="book-recs"
          type="checkbox"
          class="input-checkbox"
        />to get a book recommendation</label>
      <label>
        <input
          name="reasons"
          value="research/info"
          type="checkbox"
          class="input-checkbox"
        />to do research / find information</label>
      <label>
        <input
          name="reasons"
          value="class"
          type="checkbox"
          class="input-checkbox"
         />to take a class</label>    
      
    <div class="form-group">
      <p>Anything you would like to see improve?</p>
      <textarea
        id="comments"
        class="input-textarea"
        name="comment"
        placeholder="Enter your comment here..."
      ></textarea>
    </div>
    
    <div class="form-group">
      <button type="submit" id="submit" class="submit-button">Submit</button>
    </div>
  </form>
  
</main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Poppins:200i,400&display=swap');

body {
  background-color: #fef6e4;
  font-family: 'Poppins', sans-serif;
  max-width: 65%;
  margin: 0 auto 0 auto;
  padding-bottom: 40px;
}

header {
  text-align: center;
  line-height: .8;
}

h1 {
  color: #001858;
  font-weight: 800;
  line-height: 1.6;
}

p {
  color: #172c66;
  font-size: 1.05rem;
  font-weight: 550;
}

#name-label, 
#email-label, 
#number-label {
  color: #172c66;
  margin: 10px;
}

#name,
#email,
#number {
  border-radius: 25px;
  width: 90%;
  box-shadow: 5px 5px #8bd3dd;
}

#survey-form {
  background-color: #f3d2c1;
  padding: 20px;
  box-shadow: 5px 5px #8bd3dd;
  border-radius: 25px;
}

label {
  display: flex;
  align-items: center;
  font-size: 1rem;
  margin: 5px;
  color: #0d282c;
  cursor: pointer;
}

#dropdown {
  border: none;
  font-size: 1rem;
  padding: 15px;
  border-radius: 25px;
  box-shadow: 5px 5px #8bd3dd;
}

.input-radio {
  height: 15px;
  width: 15px;
}

.input-checkbox {
  height: 15px;
  width: 15px;
}

input {
  border: none;
  padding: 1.2rem;
}

.input-textarea {
  min-height: 100px; 
  width: 95%;
  margin-bottom: 20px;
  border: none;
  border-radius: 25px;
  box-shadow: 5px 5px #8bd3dd;
  outline: none;
  padding-top: 10px;
  padding-left: 10px;
}

.submit-button {
  background-color: #f582ae;
  font-size: 1.2rem;
  color: #001858;
  padding: 20px 70px;
  border-radius: 25px;
  box-shadow: 5px 5px #8bd3dd;
  outline: none;
  border: none;
  margin: 0 auto;
  display: block;
  cursor: pointer;
}


              
            
!

JS

              
                
              
            
!
999px

Console