Testing the autocomplete attribute

The autocomplete attribute lets web developers specify what if any permission the user agent has to provide automated assistance in filling out form field values, as well as guidance to the browser as to the type of information expected in the field.

Example 1. autocomplete="on"

HTML markup
<label for="name1">Full name</label>
<input id="name1" autocomplete="on">

Example 2. autocomplete="off"

HTML markup
<label for="name2">Full name</label>
<input id="name2" autocomplete="off">

Example 3. autocomplete="name"

HTML markup
<label for="name3">Full name</label>
<input id="name3" autocomplete="name">

Example 4. autocomplete="given-name"

HTML markup
<label for="given-name">First name</label>
<input id="given-name" autocomplete="given-name">

Example 5. autocomplete="family-name"

HTML markup
<label for="family-name">Last name</label>
<input id="family-name" autocomplete="family-name">

Example 6. autocomplete="email"

HTML markup
<label for="email">Email address</label>
<input id="email" type="email" autocomplete="email">

Example 7. autocomplete="tel"

HTML markup
<label for="phone">Phone number</label>
<input id="phone" type="tel" autocomplete="tel">

Example 8. autocomplete="address-line1"

HTML markup
<label for="address-line1">Street address</label>
<input id="address-line1" autocomplete="address-line1">

Example 9. autocomplete="address-line2"

HTML markup
<label for="address-line2">Apartment, suite, unit, etc. (optional)</label>
<input id="address-line2" autocomplete="address-line2">

Example 10. autocomplete="postal-code"

HTML markup
<label for="postal-code">Postal code</label>
<input id="postal-code" autocomplete="postal-code">

Example 11. autocomplete="country"

HTML markup
<label for="country">Country</label>
<input id="country" autocomplete="country">

Example 12. autocomplete="cc-number"

HTML markup
<label for="cc-number">Credit card number</label>
<input id="cc-number" inputmode="numeric" autocomplete="cc-number">

Example 13. autocomplete="cc-exp"

HTML markup
<label for="cc-exp">Expiration date (MM/YY)</label>
<input id="cc-exp" inputmode="numeric" autocomplete="cc-exp">

Example 14. autocomplete="cc-csc"

HTML markup
<label for="cc-csc">CVC</label>
<input id="cc-csc" inputmode="numeric" autocomplete="cc-csc">

Example 15. autocomplete="fake"

HTML markup
<label for="cc-fake">Fake</label>
<input id="cc-fake" inputmode="fake" autocomplete="fake">