HTML snippet · Free · Copy-paste

Registration form HTML template

General-purpose registration form that works for events or account signup. Both versions ship with accessible labels and validation.

The code

<form class="lf-form" action="/api/register" method="POST">
  <div class="field">
    <label for="f-first_name">First name *</label>
    <input id="f-first_name" name="first_name" type="text" required />
  </div>
  <div class="field">
    <label for="f-last_name">Last name *</label>
    <input id="f-last_name" name="last_name" type="text" required />
  </div>
  <div class="field">
    <label for="f-email">Email address *</label>
    <input id="f-email" name="email" type="email" placeholder="you@example.com" autocomplete="email" required />
  </div>
  <div class="field">
    <label for="f-password">Password *</label>
    <input id="f-password" name="password" type="password" placeholder="At least 8 characters" autocomplete="current-password" required />
  </div>
  <div class="field">
    <label for="f-country">Country *</label>
    <select id="f-country" name="country" required>
      <option value="" disabled selected>Choose…</option>
      <option value="United States">United States</option>
      <option value="United Kingdom">United Kingdom</option>
      <option value="Canada">Canada</option>
      <option value="Australia">Australia</option>
      <option value="Germany">Germany</option>
      <option value="France">France</option>
      <option value="Other">Other</option>
    </select>
  </div>
  <label class="checkbox">
    <input type="checkbox" name="terms" value="1" required />
    <span>I agree to the terms and privacy policy</span>
  </label>

  <button type="submit">Register</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

What's the difference between a signup form and a registration form?

Functionally none — 'registration' usually implies an event or program; 'signup' usually implies an account. Same HTML pattern either way.

How do I make registration multi-step?

Wrap each step in a <fieldset> and toggle hidden with JS, tracking progress in state. Or use LemForms multi-page mode — progress bar, save-and-resume, and back navigation included.

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