YouTip LogoYouTip

Att Input Autocomplete

# HTML autocomplete Attribute The `autocomplete` attribute specifies whether an `` element should have autocomplete enabled or disabled. When autocomplete is enabled, the browser automatically predicts and suggests values based on what the user has entered before in that field. As the user starts typing, a dropdown list of previously entered values appears, allowing for faster form completion. --- ## Browser Support The `autocomplete` attribute is fully supported by all major modern web browsers: * Google Chrome * Mozilla Firefox * Microsoft Edge / Internet Explorer * Safari * Opera > **Note:** In some browsers, users may need to manually enable the autocomplete feature within their browser's privacy or autofill settings. --- ## Syntax ```html ``` ### Attribute Values | Value | Description | | :--- | :--- | | `on` | **Default.** Enables the autocomplete feature. The browser will suggest previously entered values. | | `off` | Disables the autocomplete feature. The browser will not suggest past entries for this field. | --- ## Applicable Input Types The `autocomplete` attribute can be used with the `
` element, as well as the following `` types: * `text` * `search` * `url` * `tel` * `email` * `password` * Date pickers (e.g., `date`, `month`, `week`, `time`, `datetime-local`) * `range` * `color` --- ## Code Examples ### Example 1: Enabling Autocomplete on a Form with Specific Field Overrides In this example, autocomplete is enabled for the entire form, but it is explicitly disabled for the email input field. ```html





``` --- ## Important Considerations ### 1. Security and Sensitive Data It is highly recommended to set `autocomplete="off"` on sensitive input fields, such as: * One-time passwords (OTP) or verification codes. * Credit card security codes (CVV/CVC). * Highly confidential personal identification numbers. ### 2. Modern Browser Behavior with Passwords Many modern browsers ignore `autocomplete="off"` for login and password fields. To assist users with credential management, browsers will often still offer to save or autofill usernames and passwords even if `autocomplete="off"` is specified. ### 3. Advanced Autocomplete Values (HTML5) While `on` and `off` are the basic values, modern HTML5 supports a wide range of specific semantic values to help browsers autofill forms more accurately. Examples include: * `autocomplete="name"` (Full name) * `autocomplete="email"` (Email address) * `autocomplete="username"` (Username) * `autocomplete="current-password"` (Current password for login) * `autocomplete="new-password"` (New password during registration) * `autocomplete="street-address"` (Street address)
← Att Input AutofocusAtt Img Width β†’