Attribute: Autocomplete

The autocomplete attribute specifies whether a form or input field should have autocomplete on or off. When autocomplete is on, the browser automatically complete values based on values that the user has entered before. It is possible to have autocomplete "on" for the form, and "off" for specific input fields, or vice versa.

This example is an HTML form with autocomplete on (and off for one input field):

HTML file: Displayed by browser:
<form action="http://www.w3schools.com/html/action_page.php" autocomplete="on">
<br /> First name: <input type="text" name="fname">
<br />
<br /> Last name: <input type="text" name="lname">
<br />
<br /> E-mail: <input type="email" name="email" autocomplete="off">
<br />
<br /> <input type="submit">
</form>

First name:

Last name:

E-mail:

Note:

Back button Table of Contents Next button