HTML autocomplete attribute
Gives the browser the purpose of a form field or controls autofill. Use meaningful tokens such as email or current-password. A browser may still offer password-manager autofill even with off. Applicable elements include: <form>, <input>, <select>, <textarea>. Check each element’s value rules. The on/off values differ from ordered autofill detail tokens. Tokens can include section and shipping/billing grouping before field names; not every token is valid on every control. A browser or password manager can apply its own autofill policy. A form accepts on/off; eligible visible controls may use ordered detail tokens. For example, section-contact shipping street-address identifies a grouped address field. A hidden input, when autocomplete applies, uses detail tokens rather than on/off. Never treat autofill as validation.
Formal Syntax & Structure
autocomplete="email"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| autocomplete | ordered autofill tokens or on/off | Gives the browser the purpose of a form field or controls autofill. Use meaningful tokens such as email or current-password. A browser may still offer password-manager autofill even with off. |
Working Example
<label> Email <input type="email" name="email" autocomplete="email"></label>Browser Compatibility
Minimum supported versions across modern rendering engines