typestar

Forms & inputs

25 steps in 6 sets of HTML.

Forms are the most capable and most under-used part of HTML. Building one, labeling fields so they actually work, choices, then the specialized inputs for numbers, dates and files.

Validation and submission close it. Twenty-five steps, and the running argument is that the browser will do more of this for you than you think, and do it accessibly, if you let it.

Start this tour

A form

Fields & labels

Choices

  • CheckboxesIndependent on/off choices, each with its own name or a shared one.
  • Radio buttonsOne choice from several: the shared name is what makes them a group.
  • Select menusA dropdown, with option groups and a multiple-selection variant.
  • Grouped and multiple selectsA long list of options wants headings, and sometimes more than one answer.
  • Datalist suggestionsA free-text input with suggestions attached, unlike a select's closed list.
  • TextareaMulti-line text, sized in rows and columns, with its value as content.

Numbers, dates & files

Validation & submission

Encore

  • signup_form.htmlA full signup page: labeled fields, grouped choices, real validation.
  • checkout_form.htmlA checkout: grouped fields, the right autocomplete tokens, and errors tied to the inputs.

The other HTML tours