HTML | <input> autocomplete Attribute

The HTML | <input>autocomplete Attribute is used to specify whether the input field has autocompleted would be on or off. When the autocomplete attribute is set to on the browser will automatically complete the values base on which the user entered before. It works with many input fields such as text, search, URL, email, password, date pickers, range, and color.


<input autocomplete="on|off">

Attribute Values:

  • on: It specifies that autocomplete is enabled.
  • off: It specifies that the autocomplete is disabled.

Example: This Example illustrates the use of autocomplete attribute in <input> element.





<!DOCTYPE html>
        HTML | 
      <input>autocomplete Attribute
<body style="text-align:center;">
      HTML | 
      <input>autocomplete Attribute
    <form id="myGeeks">
        <input type="text" 
        <input type="submit">



Supported Browsers: The browser supported by HTML | <input>autocomplete Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.