How to disable browser Autocomplete on web form field/input tag? Last Updated : 18 Nov, 2020 Comments Improve Suggest changes Like Article Like Report Input text autocomplete is the default feature of any browser. While working with the form or input fields in HTML web page autocomplete feature of the browsers come in the picture. By default autocomplete is enabled in browsers so when submitting the form it remembers the information. So when again open the same form or fill the same input fields it shows the suggestions which were filled earlier by the user. The autocomplete attribute is used to enable and disable autocompletion of text. This attribute contains two values: on off To disable the autocomplete feature in the form or input field the autocomplete attribute set to off. Syntax: autocomplete: on/off Example: This example does not use autocomplete attribute so by default the autocomplete attribute is enable. html <!DOCTYPE html> <html> <head> <title> HTML autocomplete attribute </title> <style> form { margin: 10%; } .form-control { margin-top: 10px; } </style> <link href= "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" > </head> <body> <div class="container col-lg-12 form"> <form action="/submit" method="post" enctype="multipart/form-data"> <div class="form-group"> <input type="text" class="form-control form-control-sm" id="name" name="username" placeholder="Enter Name"> <input type="text" class="form-control form-control-sm" id="email" name="email" placeholder="Enter Email"> <input type="text" class="form-control form-control-sm" id="city" name="city" placeholder="Enter City"> <br> <button type="submit" class="btn btn-primary"> Submit </button> </div> </form> </div> </body> </html> Output: Note: The autocomplete suggestions will be displayed always as per previously filled information to the form. Example 2: This example sets autocomplete attribute to off. html <!DOCTYPE html> <html> <head> <title> HTML autocomplete attribute </title> <style> form { margin: 10%; } .form-control { margin-top: 10px; } </style> <link href= "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" > </head> <body> <div class="container col-lg-12 form"> <form action="/submit" autocomplete="off" method="post" enctype="multipart/form-data"> <div class="form-group"> <input type="text" class="form-control form-control-sm" id="name" name="username" placeholder="Enter Name"> <input type="text" class="form-control form-control-sm" id="email" name="email" placeholder="Enter Email"> <input type="text" class="form-control form-control-sm" id="city" name="city" placeholder="Enter City"> <br> <button type="submit" class="btn btn-primary"> Submit </button> </div> </form> </div> </body> </html> Output: Comment More infoAdvertise with us Next Article How to disable browser Autocomplete on web form field/input tag? A AshishkrGoyal Follow Improve Article Tags : Web Technologies HTML Similar Reads 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 disable browser autofill on input fields using jQuery ? In this article, we will see how to disable the browser auto fill property on the input field. For that, HTML page is created in which jQuery CDN is imported to use jQuery and its code is written. Approach: Create a basic HTML page having at least one input field in it with the "id" attribute.Import 2 min read How to specify whether an input element should have autocomplete disabled or not ? 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 i 2 min read HTML | DOM Input Date autocomplete Property The Input Date autocomplete property in HTML DOM is used to set or return the value of autocomplete attribute of an Input Date field. The autocomplete attribute is used to specify whether the autocomplete attribute has an "on" or "off" value. When the autocomplete attribute is set to on, the browser 2 min read jQuery UI Autocomplete disabled Option jQuery UI Autocomplete disabled option when set to true will disable the menu. The default value is False. Syntax: $( ".selector" ).autocomplete({disabled: false}),Approach: First, add the jQuery Mobile scripts needed for your project. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7 1 min read Like