HTML CSS examples for HTML Tag:input
The autocomplete attribute sets if an input field should have autocomplete enabled.
Autocomplete allows the browser to predict the value.
The autocomplete attribute works with the following <input> types: text, search, url, tel, email, password, datepickers, range, and color.
Value | Description |
---|---|
on | Default. Specifies that autocomplete is on (enabled) |
off | Specifies that autocomplete is off (disabled) |
An HTML form with autocomplete on (and off for one input field):
<!DOCTYPE html> <html> <body> <form action="/action_page.php" autocomplete="on"> First name:<input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> E-mail: <input type="email" name="email" autocomplete="off"><br> <input type="submit"> </form><!--from ww w . j a va2s . co m--> </body> </html>