All topics / Forms That Work

Forms That Work

Forms are how the web collects input - and most of what makes them good or broken lives in details people skip. Build one real signup form and wire up labels, validation, and submission the right way.

Download EPUB
  1. Inputs, Labels, and Why `<label>` Matters Input types set the keyboard and validation a field gets for free. The `<label>` element is what makes that field usable at all - not decoration.
  2. Validation: Built-in vs. Custom HTML validates form fields for free with required, pattern, and type checks - but password confirmation and server-side checks like 'is this email taken' still need JavaScript.
  3. Submitting Data: GET vs. POST, FormData, and Fetch A plain form submit navigates the whole page. preventDefault() plus fetch and FormData sends the same data without leaving the page - and lets you handle server errors gracefully.