splitforms.com
guide · html forms

HTML Forms for Practice — Exercises with Working Solutions

Six HTML form exercises with working solutions — contact form, registration with validation, file upload, multi-step wizard, accessibility audit, dark-mode redesign. Every solution POSTs to splitforms's live backend so you see real submissions.

html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="redirect"   value="https://yoursite.com/thanks" />

  <label>Name<input name="name" required /></label>
  <label>Email<input name="email" type="email" required /></label>
  <label>Message<textarea name="message" required></textarea></label>

  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" />
  <button type="submit">Send</button>
</form>

The fastest way to learn HTML forms is to build six of them and submit them to a real backend. Tutorials that demo HTML markup without a working POST destination teach you 60% of the picture — the markup, the validation, the styling — but skip the part where the submission has to land somewhere. The exercises below close that gap by using splitforms's free `/api/submit` endpoint.

Exercise 1: build a minimal contact form (name, email, message). Submit it to splitforms. Verify the email arrives in your inbox. This is the baseline; if this doesn't work, nothing else does. Exercise 2: extend the form with native validation — `required`, `type="email"`, `minlength`. Try submitting empty fields and observe the browser's native validation UI.

Exercise 3: build a registration form with password confirmation. Hint: native HTML has no `equalTo` attribute; use `setCustomValidity` in 5 lines of JS. Exercise 4: add a file upload field. Don't forget `enctype="multipart/form-data"` on the form — the #1 forgotten step. Exercise 5: convert the form to multi-step (3 steps), with a progress indicator and partial-save behavior.

Exercise 6: audit your form for accessibility. Run it through axe DevTools or Lighthouse. Fix issues — missing labels, low contrast, keyboard navigation, focus order. Browse the /guides directory for solution snippets to each exercise.

How to set this up

Step 01

Sign up for a free splitforms account

30 seconds, no credit card. You'll need an access key to submit forms.

Step 02

Work through each exercise top-to-bottom

Don't skip ahead. Each builds on the previous one's concepts.

Step 03

Submit forms to the live backend

Real submissions, real emails, real dashboard. Watching submissions arrive is the feedback loop.

Step 04

Audit for accessibility at the end

Lighthouse or axe DevTools. Fix the issues; that's where the polish happens.

Six exercises, real backend, real submissions. That's the loop.

Frequently asked questions

Where can I practice HTML forms with real submissions?

splitforms's free tier (1,000 submissions/month) is built for this. Use the same backend in your practice forms as in production code — your test submissions land in a real dashboard.

What's the best order to learn HTML forms?

Basic POST → native validation → semantic input types → accessibility (labels, fieldset, ARIA) → file uploads → multi-step → AJAX submission. Each builds on the previous.

How do I know if my form is accessible?

Run it through axe DevTools (browser extension) or Lighthouse. The big checks: every input has a label, focus order is logical, color contrast hits 4.5:1, all functionality works via keyboard.

Do I need to learn jQuery for form practice?

No. Native HTML + vanilla JavaScript covers everything jQuery did, with no dependency. Learn jQuery only if you're maintaining a codebase that requires it.

Related guides

HTML forms

HTML Form — How to Build and Submit Forms in HTML

HTML forms

HTML Form Examples — Copy-Paste Working Code for 2026

HTML forms

Free HTML Form Templates — Copy-Paste Ready (2026)

HTML forms

HTML Form Design — Modern Patterns for 2026

Ship the form, not the backend.

Free for 1,000 submissions/month. Email delivery, AI spam filtering, signed webhooks, real dashboard — all on the free plan. No credit card.

Get a free access key →