A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-input-autocomplete-attribute/ below:

HTML <input> autocomplete Attribute - GeeksforGeeks

HTML <input> autocomplete Attribute

Last Updated : 17 Apr, 2025

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: 

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 attribute

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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4