Horje

How to add HTML <input> autocomplete Attribute

An HTML form where the username and password does NOT get autocompleted.

Definition and Usage

The autocomplete attribute specifies if browsers should try to predict the value of an input field or not. You can also specify which type of value you expect in the input field.


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Tip: In some browsers you may need to activate an autocomplete function for this to work (Look under "Preferences" in the browser's menu).


Syntax

<input autocomplete="on|off|type-of-value">

Attribute Values

Value Description
on Default. Autocomplete is on (enabled)
off Autocomplete is off (disabled)
address-line1 Expects the first line of the street address
address-line2 Expects the second line of the street address
address-line3 Expects the third line of the street address
address-level1 Expects the first level of the address, e.g. the county
address-level2 Expects the second level of the address, e.g. the city
address-level3 Expects the third level of the address
address-level4 Expects the fourth level of the address
street-address Expects the full street address
country Expects the country code
country-name Expects the country name
postal-code Expects the post code
name Expects the full name
additional-name Expects the middle name
family-name Expects the last name
give-name Expects the first name
honoric-prefix Expects the title, like "Mr", "Ms" etc.
honoric-suffix Expects the suffix, like "5", "Jr." etc.
nickname Expects the nickname
organization-title Expects the job title
username Expects the username
new-password Expects a new password
current-password Expects the current password
bday Expects the full birthday date
bday-day Expects the day of the birthday date
bday-month Expects the month of the birthday date
bday-year Expects the year of the birthday date
sex Expects the gender
one-time-code Expects a one time code for verification etc.
organization Expects the company name
cc-name Expects the credit card owner's full name
cc-given-name Expects the credit card owner's first name
cc-additional-name Expects the credit card owner's middle name
cc-family-name Expects the credit card owner's full name
cc-number Expects the credit card's number
cc-exp Expects the credit card's expiration date
cc-exp-month Expects the credit card's expiration month
cc-exp-year Expects the credit card's expiration year
cc-csc Expects the CVC code
cc-type Expects the credit card's type of payment
transaction-currency Expects the currency
transaction-amount Expects a number, the amount
language Expects the preferred language
url Expects a we address
email Expects the email address
photo Expects an image
tel Expects the full phone number
tel-country-code Expects the country code of the phone number
tel-national Expects the phone number with no country code
tel-area-code Expects the area code of the phone number
tel-local Expects the phone number with no country code and no area code
tel-local-prefix Expects the local prefix of the phone number
tel-local-suffix Expects the local suffix of the phone number
tel-extension Expects the extension code of the phone number
impp Expects the url of an instant messaging protocol endpoint
index.html
Example: HTML
<form action="/action_page.php">
  <label for="username">Username:</label>
  <input type="text" id="username" name="username"><br><br>
  <label for="password">Password:</label>
  <input type="password" id="password" name="password" autocomplete="new-password"><br><br>
  <input type="submit">
</form> 

Output should be:

How to add HTML <input> autocomplete Attribute



Single Articles
How to add HTML <input> TagHTML Tag
How to add HTML <input> accept AttributeHTML Tag
How to add HTML <input> accept file_extension AttributeHTML Tag
How to add HTML <input> accept audio/* AttributeHTML Tag
How to add HTML <input> accept video/* AttributeHTML Tag
How to add HTML <input> accept image/* AttributeHTML Tag
How to add HTML <input> accept media_type AttributeHTML Tag
How to add HTML <input> alt AttributeHTML Tag
How to add HTML <input> autocomplete AttributeHTML Tag
How to add HTML <input> autocomplete on AttributeHTML Tag
How to add HTML <input> autocomplete off AttributeHTML Tag
How to add HTML <input> autocomplete address-line1 AttributeHTML Tag
How to add HTML <input> autocomplete address-line2 AttributeHTML Tag
How to add HTML <input> autocomplete address-line3 AttributeHTML Tag
How to add HTML <input> autocomplete address-level1 AttributeHTML Tag
How to add HTML <input> autocomplete address-level2 AttributeHTML Tag
How to add HTML <input> autocomplete address-level3 AttributeHTML Tag
How to add HTML <input> autocomplete address-line4 AttributeHTML Tag
How to add HTML <input> autocomplete street-address AttributeHTML Tag
How to add HTML <input> autocomplete country AttributeHTML Tag
How to add HTML <input> autocomplete country-name AttributeHTML Tag
How to add HTML <input> autocomplete postal-code AttributeHTML Tag
How to add HTML <input> autocomplete name AttributeHTML Tag
How to add HTML <input> autocomplete additional-name AttributeHTML Tag
How to add HTML <input> autocomplete family-name AttributeHTML Tag
How to add HTML <input> autocomplete give-name AttributeHTML Tag
How to add HTML <input> autocomplete honoric-prefix AttributeHTML Tag
How to add HTML <input> autocomplete name AttributeHTML Tag
How to add HTML <input> autocomplete nickname AttributeHTML Tag
How to add HTML <input> autocomplete organization-title AttributeHTML Tag
How to add HTML <input> autocomplete username AttributeHTML Tag
How to add HTML <input> autocomplete new-password AttributeHTML Tag
How to add HTML <input> autocomplete new-password AttributeHTML Tag
How to add HTML <input> autocomplete current-password AttributeHTML Tag
How to add HTML <input> autocomplete bday AttributeHTML Tag
How to add HTML <input> autocomplete bday-day AttributeHTML Tag
How to add HTML <input> autocomplete bday-month AttributeHTML Tag
How to add HTML <input> autocomplete bday-year AttributeHTML Tag
How to add HTML <input> autocomplete sex AttributeHTML Tag
How to add HTML <input> autocomplete one-time-code AttributeHTML Tag
How to add HTML <input> autocomplete organization AttributeHTML Tag
How to add HTML <input> autocomplete cc-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-given-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-additional-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-family-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-number AttributeHTML Tag
How to add HTML <input> autocomplete cc-exp AttributeHTML Tag
How to add HTML <input> autocomplete cc-exp-month AttributeHTML Tag
How to add HTML <input> autocomplete cc-exp-year AttributeHTML Tag
How to add HTML <input> autocomplete cc-csc AttributeHTML Tag
How to add HTML <input> autocomplete cc-type AttributeHTML Tag
How to add HTML <input> autocomplete transaction-currency AttributeHTML Tag
How to add HTML <input> autocomplete transaction-amount AttributeHTML Tag
How to add HTML <input> autocomplete language AttributeHTML Tag
How to add HTML <input> autocomplete url AttributeHTML Tag
How to add HTML <input> autocomplete email AttributeHTML Tag
How to add HTML <input> autocomplete photo AttributeHTML Tag
How to add HTML <input> autocomplete tel AttributeHTML Tag
How to add HTML <input> autocomplete tel-country-code AttributeHTML Tag
How to add HTML <input> autocomplete tel-national AttributeHTML Tag
How to add HTML <input> autocomplete tel-area-code AttributeHTML Tag
How to add HTML <input> autocomplete tel-local AttributeHTML Tag
How to add HTML <input> autocomplete tel-local-prefix AttributeHTML Tag
How to add HTML <input> autocomplete tel-local-suffix AttributeHTML Tag
How to add HTML <input> autocomplete tel-extension AttributeHTML Tag
How to add HTML <input> autocomplete impp AttributeHTML Tag
How to add HTML <input> autofocus AttributeHTML Tag
How to add HTML <input> checked AttributeHTML Tag
How to add HTML <input> dirname AttributeHTML Tag
How to add HTML <input> disabled AttributeHTML Tag
How to add HTML <input> form AttributeHTML Tag
How to add HTML <input> formaction AttributeHTML Tag
How to add HTML <input> formenctype AttributeHTML Tag
How to add HTML <input> formmethod AttributeHTML Tag
How to add HTML <input> formmethod get AttributeHTML Tag
How to add HTML <input> formmethod post AttributeHTML Tag
How to add HTML <input> formnovalidate AttributeHTML Tag
How to add HTML <input> formtarget AttributeHTML Tag
How to add HTML <input> formtarget _blank AttributeHTML Tag
How to add HTML <input> formtarget _self AttributeHTML Tag
How to add HTML <input> formtarget _parent AttributeHTML Tag
How to add HTML <input> formtarget _top AttributeHTML Tag
How to add HTML <input> formtarget framename AttributeHTML Tag
How to set HTML <input> height AttributeHTML Tag
How to set HTML <input> list AttributeHTML Tag
How to add HTML <input> max AttributeHTML Tag
How to add HTML <input> max number AttributeHTML Tag
How to add HTML <input> max date AttributeHTML Tag
How to add HTML <input> maxlength AttributeHTML Tag
How to add HTML <input> min AttributeHTML Tag
How to add HTML <input> min number AttributeHTML Tag
How to add HTML <input> min date AttributeHTML Tag
How to add HTML <input> minlength AttributeHTML Tag
How to add HTML <input> multiple AttributeHTML Tag
How to add HTML <input> name AttributeHTML Tag
How to add HTML <input> pattern AttributeHTML Tag
How to add HTML <input> pattern Specific characters AttributeHTML Tag
How to add HTML <input> pattern uppercase and lowercase letter AttributeHTML Tag
How to add HTML <input> pattern characters @,.;''#$%^&8 AttributeHTML Tag
How to add HTML <input> pattern characters [^'\x22]+HTML Tag
How to add HTML <input> pattern characters http:// or https://HTML Tag
How to add HTML <input> placeholder AttributeHTML Tag
How to add HTML <input> popovertarget AttributeHTML Tag
How to add HTML <input> popovertargetaction AttributeHTML Tag
How to add HTML <input> popovertargetaction hide AttributeHTML Tag
How to add HTML <input> popovertargetaction show AttributeHTML Tag
How to add HTML <input> popovertargetaction toggle AttributeHTML Tag
How to add HTML <input> readonly AttributeHTML Tag
How to add HTML <input> required AttributeHTML Tag
How to add HTML <input> size AttributeHTML Tag
How to add HTML <input> src AttributeHTML Tag
How to add HTML <input> step AttributeHTML Tag
How to add HTML <input> type AttributeHTML Tag
How to add HTML <input> type button AttributeHTML Tag
How to add HTML <input> type checkbox AttributeHTML Tag
How to add HTML <input> type color AttributeHTML Tag
How to add HTML <input> type date AttributeHTML Tag
How to add HTML <input> type datetime-local AttributeHTML Tag
How to add HTML <input> type email AttributeHTML Tag
How to add HTML <input> type file AttributeHTML Tag
How to add HTML <input> type hidden AttributeHTML Tag
How to add HTML <input> type image AttributeHTML Tag
How to add HTML <input> type month AttributeHTML Tag
How to add HTML <input> type number AttributeHTML Tag
How to add HTML <input> type password AttributeHTML Tag
How to add HTML <input> type radio AttributeHTML Tag
How to add HTML <input> type range AttributeHTML Tag
How to add HTML <input> type reset AttributeHTML Tag
How to add HTML <input> type search AttributeHTML Tag
How to add HTML <input> type submit AttributeHTML Tag
How to add HTML <input> type tel AttributeHTML Tag
How to add HTML <input> type text AttributeHTML Tag
How to add HTML <input> type time AttributeHTML Tag
How to add HTML <input> type url AttributeHTML Tag
How to add HTML <input> type week AttributeHTML Tag
How to add HTML <input type="button">HTML Tag
How to add HTML <input type="checkbox">HTML Tag
How to add HTML <input type="color">HTML Tag
How to add HTML <input type="date">HTML Tag
How to add HTML <input type="datetime-local">HTML Tag
How to add HTML <input type="email">HTML Tag
How to add HTML <input type="file">HTML Tag
How to add HTML <input type="hidden">HTML Tag
How to add HTML <input type="image">HTML Tag
How to add Align input image (with CSS) on Submit ButtonHTML Tag
How to add HTML <input type="month">HTML Tag
How to add HTML <input type="number">HTML Tag
How to add HTML <input type="password">HTML Tag
How to add HTML <input type="radio">HTML Tag
How to add HTML <input type="range">HTML Tag
How to add HTML <input type="reset">HTML Tag
How to add HTML <input type="search">HTML Tag
How to add HTML <input type="submit">HTML Tag
How to add HTML <input type="tel">HTML Tag
How to add HTML <input type="text">HTML Tag
How to add HTML <input type="time">HTML Tag
How to add HTML <input type="url">HTML Tag
How to add HTML <input type="week">HTML Tag
How to add HTML <input> value AttributeHTML Tag
How to add HTML <input> width AttributeHTML Tag


Related Articles
What is HTML <!--...--> Tag HTML Tag
What is HTML <!DOCTYPE> Declaration HTML Tag
What is HTML Elements and Doctypes HTML Tag
What is HTML <a> Tag HTML Tag
What is HTML <abbr> Tag HTML Tag
What is HTML <acronym> Tag HTML Tag
What is HTML <address> Tag HTML Tag
What is HTML <applet> Tag HTML Tag
What is HTML <area> Tag HTML Tag
What is HTML <article> Tag HTML Tag
What is HTML <aside> Tag HTML Tag
What is HTML <audio> Tag HTML Tag
What is HTML <b> Tag HTML Tag
What is HTML <base> Tag HTML Tag
What is HTML <basefont> Tag HTML Tag
What is HTML <bdi> Tag HTML Tag
What is HTML <bdo> Tag HTML Tag
What is HTML <big> Tag HTML Tag
What is HTML <blockquote> Tag HTML Tag
What is HTML <body> Tag HTML Tag
What is HTML <br> Tag HTML Tag
What is HTML <button> Tag HTML Tag
What is HTML <canvas> Tag HTML Tag
What is HTML <caption> Tag HTML Tag
What is HTML <center> Tag HTML Tag
What is HTML <cite> Tag HTML Tag
What is HTML <code> Tag HTML Tag
What is HTML <col> Tag HTML Tag
How to create HTML <colgroup> Tag HTML Tag
What is HTML <data> Tag HTML Tag
What is HTML <datalist> Tag HTML Tag
What is HTML <dd> Tag HTML Tag
What is HTML <del> Tag HTML Tag
What is HTML <details> Tag HTML Tag
What is HTML <dfn> Tag HTML Tag
What is HTML <dialog> Tag HTML Tag
What is HTML <dir> Tag HTML Tag
What is HTML <div> Tag HTML Tag
What is HTML <dl> Tag HTML Tag
What is HTML <dt> Tag HTML Tag
What is HTML <em> Tag HTML Tag
What is HTML <embed> Tag HTML Tag
What is HTML <fieldset> Tag HTML Tag
What is HTML <figcaption> Tag HTML Tag
What is HTML <figure> Tag HTML Tag
What is HTML <font> Tag HTML Tag
What is HTML <footer> Tag HTML Tag
What is HTML <form> Tag HTML Tag
What is HTML <frame> Tag HTML Tag
What is HTML <frameset> Tag HTML Tag
What is HTML <h1> to <h6> Tags HTML Tag
What is HTML <head> Tag HTML Tag
What is HTML <header> Tag HTML Tag
What is HTML <hgroup> Tag HTML Tag
What is HTML <hr> Tag HTML Tag
What is HTML <html> Tag HTML Tag
What is HTML <i> Tag HTML Tag
What is HTML <iframe> Tag HTML Tag
What is HTML <img> Tag HTML Tag
What is HTML <input> Tag HTML Tag
What is HTML <ins> Tag HTML Tag
What is HTML <kbd> Tag HTML Tag
What is HTML <label> Tag HTML Tag
What is HTML <legend> Tag HTML Tag
What is HTML <li> Tag HTML Tag
What is HTML <link> Tag HTML Tag
What is HTML <main> Tag HTML Tag
What is HTML <map> Tag HTML Tag
What is HTML <mark> Tag HTML Tag
What is HTML <menu> Tag HTML Tag
What is HTML <meta> Tag HTML Tag
What is HTML <meter> Tag HTML Tag
What is HTML <nav> Tag HTML Tag
What is HTML <noframes> Tag HTML Tag
What is HTML <noscript> Tag HTML Tag
What is HTML <object> Tag HTML Tag
What is HTML <ol> Tag HTML Tag
What is HTML <optgroup> Tag HTML Tag
What is HTML <option> Tag HTML Tag
What is HTML <output> Tag HTML Tag
What is HTML <p> Tag HTML Tag
What is HTML <param> Tag HTML Tag
What is HTML <picture> Tag HTML Tag
What is HTML <pre> Tag HTML Tag
What is HTML <progress> Tag HTML Tag
What is HTML <q> Tag HTML Tag
What is HTML <rp> Tag HTML Tag
What is HTML <rt> Tag HTML Tag
What is HTML <ruby> Tag HTML Tag
What is HTML <s> Tag HTML Tag
What is HTML <samp> Tag HTML Tag
What is HTML <script> Tag HTML Tag
What is HTML <search> Tag HTML Tag
What is HTML <section> Tag HTML Tag
What is HTML <select> Tag HTML Tag
What is HTML <small> Tag HTML Tag
What is HTML <source> Tag HTML Tag
What is HTML <span> Tag HTML Tag
What is HTML <strike> Tag HTML Tag
What is HTML <strong> Tag HTML Tag
What is HTML <style> Tag HTML Tag
What is HTML <sub> Tag HTML Tag
What is HTML <summary> Tag HTML Tag
What is HTML <sup> Tag HTML Tag
What is HTML <svg> Tag HTML Tag
What is HTML <table> Tag HTML Tag
What is HTML <tbody> Tag HTML Tag
What is HTML <td> Tag HTML Tag
What is HTML <template> Tag HTML Tag
What is HTML <textarea> Tag HTML Tag
What is HTML <tfoot> Tag HTML Tag
What is HTML <th> Tag HTML Tag
What is HTML <thead> Tag HTML Tag
What is HTML <time> Tag HTML Tag
What is HTML <title> Tag HTML Tag
What is HTML <tr> Tag HTML Tag
What is HTML <track> Tag HTML Tag
What is HTML <tt> Tag HTML Tag
What is HTML <u> Tag HTML Tag
What is HTML <ul> Tag HTML Tag
What is HTML <var> Tag HTML Tag
What is HTML <video> Tag HTML Tag
How to add HTML <wbr> Tag HTML Tag

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin



Share on: