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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 lang="en">

  <head>
    <meta charset="UTF-8">
    <title>Client Survey</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="/main.css">
  </head>

  <body>

    <!-- Header     -->

    <main class="container">
      <div class="header">
        <h1 id="title">Client Survey</h1>
        <p id="description">
          Thank you for working with me! Please fill out this form to provide me with feedback.
        </p>
      </div>

      <!-- Name, Email, Age      -->

      <form id="survey-form" autocomplete="on">
        <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
                 />

          <label id="email-label" for="email">Email</label>
          <input
                 type="email"
                 name="email"
                 id="email"
                 class="form-control"
                 placeholder="Enter your email"
                 required
                 />

          <label id="number-label" for="age">Age<span class="op">(optional)</span></label>
          <input
                 type="number"
                 name="age"
                 id="number"
                 min="10"
                 max="99"
                 class="form-control"
                 placeholder="Enter your age"
                 required
                 />
        </div>

        <!-- Source       -->

        <div class="form-group">
          <h2>How did you hear about me?</h2>
          <select id="dropdown" name="source" class="form-control" required>
            <option disabled selected value>Select and option</option>
            <option value="insta">Instagram</option>
            <option value="facebook">Facebook</option>
            <option value="mouth">Word of mouth</option>
          </select>
        </div>

        <!-- Order, Satisfied   -->

        <div class="form-group">
          <h2 class="h2var">What did you order from me?</h2>
          <label>
            <input
                   name="order"
                   value="logo"
                   type="checkbox"
                   class="input-checkbox"
                   />
            Logo
          </label>
          <label>
            <input
                   name="order"
                   value="illustration"
                   type="checkbox"
                   class="input-checkbox"
                   />
            Illustration
          </label>
          <label>
            <input
                   name="order"
                   value="Website"
                   type="checkbox"
                   class="input-checkbox"
                   />
            Website
          </label>
          <label>
            <input
                   name="order"
                   value="Poster"
                   type="checkbox"
                   class="input-checkbox"
                   />
            Poster
          </label>
          <label>
            <input
                   name="order"
                   value="Animation"
                   type="checkbox"
                   class="input-checkbox"
                   />
            Animation
          </label>

          <h2 class="h2var">Were you satisfied with my service?</h2>
          <label>
            <input
                   name="satisfied"
                   value="Yes"
                   type="radio"
                   class="input-radio"
                   />
            Yes
          </label>
          <label>
            <input
                   name="satisfied"
                   value="No"
                   type="radio"
                   class="input-radio"
                   />
            No
          </label>
        </div>

        <!-- Comments    -->

        <div class="form-group">
          <h2 class="h2var">Any comments?<span class="op">(optional)</span></h2>
          <textarea
                    id="comments"
                    class="input-textarea"
                    name="comment"
                    placeholder="Enter your comments here..."
                    ></textarea>
        </div>

        <!--   Submit     -->
        <div class="form-group">
          <button type="submit" id="submit" class="submit-button">
            Submit
          </button>
        </div>
        
      </form>
    </main>

  </body>

</html>
              
            
!

CSS

              
                :root {
  --main-color: #9E005D;
}

* {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-family: "Acumin Pro", sans-serif;
  border: none;
}

body {
  overflow-x: hidden;
}


/* Header */

.header {
  background-color: var(--main-color);
  padding: 0 0 20px 24px;
  color: white;
  font-family: sans-serif;
  border-radius: 0 0 7px 7px;
}

h1 {
  padding: 50px 0 0 0;
  font-weight: bold;
  font-size: 40px;
  transition: font-size 0.3s;
}

p {
  padding: 5px 0 10px 0;
  line-height: 24px;
  width: 303px;
  font-weight: normal;
  font-size: 16px;
}


/* Survey  */

#survey-form {
  padding: 1rem;
}

.form-group {
  display: grid;
  padding: 18px 0 0 0;
}

h2, label {
  font-weight: normal;
  font-size: 18px;
}

.op {
  padding-left: 5px;
  font-size: 16px;
}

/* Name etc + Source */

input,
.form-control {
  margin: 10px 0 15px 0;
  height: 40px;
  border-radius: 6px;
  border: 1px solid black;
}

input[placeholder],
.form-control {
  padding-left: 10px;
}

/* Checkbox etc */

.input-checkbox,
.input-radio {
  display: inline-block;
  margin: 5px 2px 0 0;
  height: 15px;
  min-width: 15px;
  border: 1px solid black;
}

.h2var {
  margin: 15px 0 10px 0;
}

/* Comments */

textarea {
  min-height:140px;
  border: 1px solid black;
  border-radius: 6px;
}

textarea[placeholder] {
  padding: 10px 0 0 10px;
}

/* Submit */

.submit-button {
  margin: 10px 0 15px 0;
  height: 40px;
  border-radius: 6px;
  background-color: var(--main-color);
  color: white;
  transition: background-color 0.3s, border 0.3s, color 0.3s;
}

.submit-button:hover {
  background-color: white;
  border: 2px solid var(--main-color);
  color: var(--main-color);
}

/* Big Screen */

@media (min-width: 640px) {
 
/* Centering */
  
  .header,
  h1,
  #survey-form {
    width: 100vw;
    margin: auto;
  }

  h1, p, #survey-form {
    max-width: 720px;
  }

  .header {
    padding: 0 0 0 20px;
    height: 175px;
  }

  h1 {
    font-size: 50px;
  }

  p {
    width: 100%;
    margin: auto;

  }
}
              
            
!

JS

              
                
              
            
!
999px

Console