HTML <input> autocomplete Attribute Last Updated : 17 Apr, 2025 Suggest changes Share Like Article Like Report The HTML | <input>autocomplete Attribute is used to specify whether the input field has autocompleted and would be on or off. When the autocomplete attribute is set to on the browser will automatically complete the values based on what the user entered before. It works with many input fields such as text, search, URL, email, password, date pickers, range, and color.Syntax: <input autocomplete="on|off">Attribute Values: on: It has a default value. 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. html <!DOCTYPE html> <html> <head> <title> HTML | input autocomplete Attribute </title> </head> <body style="text-align:center;"> <h1>GeeksForGeeks</h1> <h2> HTML | input autocomplete Attribute </h2> <form id="myGeeks"> <input type="text" id="text_id" name="geeks" autocomplete="on"> <input type="submit"> </form> <br> </body> </html> Output: HTML input autocomplete attributeSupported Browsers: The browser supported by HTML <input> autocomplete Attribute are listed below: Google ChromeInternet ExplorerFirefoxOperaSafari Advertise with us M manaschhabra2 Follow Similar Reads HTML <input> align Attribute The HTML <input> align attribute is used with <input type=â imageâ> to set the horizontal alignment of the image. It is not supported by HTML 5. Note: Since <input type=â imageâ> is not supported by HTML5 you can use CSS there instead of this attribute. The syntax for CSS <input 1 min read HTML input maxlength Attribute The maxlength attribute in the HTML <input> element is used to define the maximum number of characters that can be entered into the field. If no value is specified, or if an invalid value is provided, the input field will have no maximum length. The length is determined in UTF-16 code units, w 2 min read HTML | <input> name Attribute The HTML <input> name Attribute is used to specify a name for an <input> element. It is used to reference the form-data after submitting the form or to reference the element in a JavaScript. Syntax: <input name="name"> Attribute Values: It contains a single value name which describ 1 min read HTML | <input> list Attribute The HTML <input> list Attribute is used to identify a list of pre-defined options for an element to suggest the user. Syntax: <input list="datalist_id"> Attribute Values: datalist_id: It is used to specify the Id of the datalist that will used to make a link up with the input element. Ex 1 min read HTML | <input> required Attribute The HTML required Attribute is a Boolean attribute which is used to specify that the input element must be filled out before submitting the Form. This attribute works with other types of input like radio, checkbox, number, text, etc.Syntax: <input required> Example-1: This Example that illustr 1 min read HTML <input> disabled Attribute The disabled attribute for <input> element in HTML 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: html < 1 min read HTML <input> type Attribute The HTML <input> type Attribute is used to specify the type of <input> element to display. The default type of <input> type attribute is text. Syntax: <input type="value">Attribute Values: Name Description button Defines clickable button in HTML document, commonly activated w 3 min read HTML input autofocus Attribute The autofocus attribute in HTML is used to specify that a particular form element (like an input field, textarea, or select dropdown) should automatically receive focus when the page is loaded, allowing the user to start interacting with it immediately without needing to click on it.Syntax<input 1 min read HTML | input readonly Attribute The readonly attribute of <input> element in HTML is used to specify that the input field is read-only. If an input is readonly, then it's content cannot be changed but can be copied and highlighted. It is a boolean attribute. Syntax: <input readonly> Example: This example uses HTML < 1 min read HTML < input> accept Attribute The HTML <input> accept attribute is used to control the type of files that can be selected for input, restricting the file selection to specific formats such as image/* for images or .pdf for PDF files. Syntax: <input accept = "file_extension | audio/* | video/* | image/* | media_type"> 4 min read Article Tags : Web Technologies HTML HTML-Attributes Like