Labels and Inputs
Give every field a clear name, purpose, and submission name.
Explicit labels connect visible text to controls
The label's for value matches the input's unique id. Selecting the label also focuses the input.
Why each attribute matters
typecommunicates the kind of data and can improve mobile keyboards.nameidentifies the value during form submission.autocompletehelps browsers fill familiar personal information.requiredprovides a native constraint; the label still explains the field.