Form
Address input
Published on
Description
Address fields capture physical address information. Group address fields inside a <fieldset> with a <legend> to provide context for the related fields.
Example
Accessibility
- Use
<fieldset>and<legend>to group address fields. The legend text should describe the address purpose (e.g. "Shipping address"). - Use appropriate
autocompletevalues for each field (street-address,address-line1,address-line2,address-level2for city,address-level1for state/province,postal-code,country). - Each field must have its own explicit
<label for="id">association.
References
- Use Legend and Fieldset (opens in new tab) — Adrian Roselli
- My Priority of Methods for Labeling a Control (opens in new tab) — Adrian Roselli
Related
- Text input — for individual fields
- Address — for displaying contact information
Variables
None for input