Skip to content
Related Articles

Related Articles

Improve Article

HTML | <input> autocomplete Attribute

  • Last Updated : 29 Apr, 2019

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.

Syntax:

<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>
  
<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:

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

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

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :