How to specify whether an input element should have autocomplete disabled or not ? Last Updated : 17 Mar, 2021 Comments Improve Suggest changes Like Article Like Report The autocomplete attribute specifies whether an autocomplete input field should be enabled. The browser can predict the value using autocomplete. The browsing options to fill in the field, based on earlier typed values, should be shown for the user while typing a field. If the autocomplete feature is enabled, the browser will suggest values based on what users have previously entered the field. If the autocomplete feature is disabled, the browser will not show the values automatically, depending on the previous users. Note: Text, search, URL, mobile, email, password, date pickers, range, and color, all work with the autocomplete attribute. Syntax: <input autocomplete="on|off"> Values: on: This is the default setting. It states that autocomplete is enabled.off: This states that the autocomplete is disabled. Example 1: The following example demonstrates the disabled state of autocomplete feature. In this case, the browser will not show the values automatically, entered by the previous users. HTML <!DOCTYPE html> <html> <head> <title>OFF</title> </head> <body> <form action = "/gfg" method = "post" autocomplete="off"> Full Name <br> <input type = "text" name = "full_name"> <br> <input type = "submit" value = "submit" /> </form> </body> </html> Output : autocomplete is Off Example 2: The following example demonstrates the enabled state of autocomplete feature. When autocomplete is turned on, then the browser will suggest values based on what users have previously entered the field. HTML <!DOCTYPE html> <html> <head> <title>ON</title> </head> <body> <form action = "/gfg" method = "post" autocomplete="on"> Full Name <br> <input type = "text" name = "full_name"> <br> <input type = "submit" value = "submit" /> </form> </body> </html> Output : autocomplete is on Comment More infoAdvertise with us Next Article How to specify whether an input element should have autocomplete disabled or not ? P priyavermaa1198 Follow Improve Article Tags : Web Technologies HTML HTML-Questions Similar Reads How to specify that an input element should be disabled? The disabled attribute for <input> element is used to specify that the input field is disabled. A disabled input is un-clickable and unusable. It is a boolean attribute. The disabled <input> elements are not submitted in the form. Syntax:<input disabled>Example: In this example, to 1 min read How to specify that a keygen element should be disabled in HTML ? The <keygen>element in HTML helps in encryption key generation so that data can be transferred between the server and client securely. This encryption may affect the user experience and reduce website performance in the case of users with fewer system requirements. This can cause issues in the 1 min read How to disable autocomplete of an HTML input field ? In this article, we will learn how to disable or off autocomplete features of a particular input field in HTML form. As we know the autocomplete feature is used to allow a browser to automatically complete the input data value based on the values that the user entered before. The latest browsers sup 1 min read How to specify that an option should be disabled in HTML5 ? The <select> tag is used to create a drop-down list in an HTML document. Generally, it is used in the forms when some data is to be collected from the user. By default, all the values or options can be chosen or selected from the drop-down list created using the <select> element. However 2 min read How to specify that a group of related form elements should be disabled using HTML? In this article, we will learn how to specify that a group of related form elements should be disabled using HTML. When the disabled attribute is present, it specifies that the input field is disabled. We can not write any content in a disabled input field. Approach: We will be using the disabled at 1 min read Like