Asking for information
Sign-ups, searches, orders — forms are how visitors talk back. The most important rule: every input needs a label. It tells people (and screen readers) what to type, and clicking it focuses the field.
form, label, input, button
- <label for="x"> connects to the input with id="x" — or wrap the input inside the label.
- name is the key the value is sent under when the form is submitted.
- action is where the form sends data; method="post" for changes, get for searches.
- autocomplete helps browsers fill in known details.