HTML snippet · Free · Copy-paste

Survey form HTML template

A typical survey: one rating, one multi-choice, one open-ended question. Drop either version into your page.

The code

<form class="lf-form" action="/api/survey" method="POST">
  <fieldset class="field">
    <legend>How satisfied are you? *</legend>
      <label class="radio">
        <input type="radio" name="satisfaction" value="1 — Very unsatisfied" required />
        <span>1 — Very unsatisfied</span>
      </label>
      <label class="radio">
        <input type="radio" name="satisfaction" value="2" />
        <span>2</span>
      </label>
      <label class="radio">
        <input type="radio" name="satisfaction" value="3" />
        <span>3</span>
      </label>
      <label class="radio">
        <input type="radio" name="satisfaction" value="4" />
        <span>4</span>
      </label>
      <label class="radio">
        <input type="radio" name="satisfaction" value="5 — Very satisfied" />
        <span>5 — Very satisfied</span>
      </label>
  </fieldset>
  <div class="field">
    <label for="f-channel">How did you hear about us? *</label>
    <select id="f-channel" name="channel" required>
      <option value="" disabled selected>Choose…</option>
      <option value="Search engine">Search engine</option>
      <option value="Friend or colleague">Friend or colleague</option>
      <option value="Social media">Social media</option>
      <option value="Ad">Ad</option>
      <option value="Other">Other</option>
    </select>
  </div>
  <div class="field">
    <label for="f-comments">Any other feedback?</label>
    <textarea id="f-comments" name="comments" rows="4" placeholder="Tell us more…"></textarea>
  </div>

  <button type="submit">Submit survey</button>
</form>

<style>
.lf-form { max-width: 480px; margin: 0 auto; font-family: system-ui, sans-serif; }
.lf-form .field { margin-bottom: 1rem; }
.lf-form label, .lf-form legend { display: block; font-weight: 500; margin-bottom: 0.35rem; font-size: 0.9rem; }
.lf-form input, .lf-form select, .lf-form textarea {
  width: 100%; padding: 0.65rem 0.75rem; font-size: 1rem;
  border: 1px solid #d1d5db; border-radius: 0.5rem; background: #fff;
  font-family: inherit;
}
.lf-form input:focus, .lf-form select:focus, .lf-form textarea:focus {
  outline: 2px solid #2563eb; outline-offset: 1px; border-color: #2563eb;
}
.lf-form .checkbox, .lf-form .radio { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
.lf-form .checkbox input, .lf-form .radio input { width: auto; }
.lf-form button {
  width: 100%; padding: 0.75rem 1rem; font-size: 1rem; font-weight: 600;
  color: #fff; background: #2563eb; border: 0; border-radius: 0.5rem; cursor: pointer;
}
.lf-form button:hover { background: #1d4ed8; }
</style>

Live preview

Rendered in a sandboxed iframe — exactly what you'll get when you paste the snippet.

Frequently asked questions

How do I add conditional logic to this survey form?

Pure HTML can't branch — write JS to show/hide fields based on answers. Or switch to LemForms, where every field has visual if/then logic with zero code.

How do I analyze survey responses?

Store them in a database and build dashboards. LemForms gives you response charts, NPS/CSAT auto-calculations, and CSV export out of the box.

Skip the HTML — build this in 30 seconds

LemForms gives you the same form with a real backend: submissions dashboard, email notifications, conditional logic, file uploads, webhooks, and Stripe payments. No code.

Try LemForms free