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.
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
Sign up for a free splitforms account
30 seconds, no credit card. You'll need an access key to submit forms.
Work through each exercise top-to-bottom
Don't skip ahead. Each builds on the previous one's concepts.
Submit forms to the live backend
Real submissions, real emails, real dashboard. Watching submissions arrive is the feedback loop.
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
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 →