Open In App
Related Articles

HTML | <select> autocomplete Attribute

Improve Article
Improve
Save Article
Save
Like Article
Like

The HTML <select> autocomplete attribute is used to specify that the form has autocompleted on or off. When the autocomplete attribute is set to on the browser will automatically complete the values based on which the user entered before.

Syntax:

<select autocomplete="on | off"> 

Attribute Values:

  • on: It is the default value. When the autocomplete attribute is set to on the browser will automatically complete the values based on which the user entered before.
  • off: The user should have entered the values of each field for every use. The browser should not autocomplete entries.

Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML select autocomplete Attribute
    </title>
</head>
  
<body style="text-align:center">
  
    <h1 style="color: green;">
        GeeksforGeeks
    </h1>
      
    <h2>
        HTML select autocomplete Attribute
    </h2>
      
    <select autocomplete="on">
        <option value="binary">
            Binary Search
        </option>
        <option value="linear">
            Linear Search
        </option>
        <option value="interpolation">
            Interpolation Search
        </option>
    </select>
</body>
  
</html>


Output:

Supported Browsers: The browsers supported by HTML <select> autocomplete attribute are listed below:

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

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 24 Apr, 2020
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials