INTRODUCTION
In this blog, I will explain the Autocomplete HTML input attribute.
HTML input attributes
Attributes mean a single atomic unit of an entity.
- The value attribute --> specifies the value of the input.
- The readonly attribute --> the input values which cannot be changed but we can read.
- The disabled attribute --> the value cannot be used in the forms.
- The size attribute --> specifies the size of the characters.
- The maxlength attribute --> depends upon the length of inputs.
HTML Autocomplete attributes
The Autocomplete attribute is used to provide the options at an input field so that the text in the field can be filled automatically.
SYNTAX
<input autocomplete="on|off">
- <!DOCTYPE html>
- <html>
- <body><title> autocomplete</title>
- <form action="/blogs.php" autocomplete="on">
- Name:<input type="text" name="name1"><br>
- Department:<input type="text" name="name2"><br>
- E-mail:<input type="email" name="email" autocomplete="off"><br>
- <input type="submit">
- </form>
- </body>
- </html>
ATTRIBUTES |
VALUE |
DESCRIPTION |
Autocomplete |
On or Off |
Check whether the autocomplete option is enabled or not, in the input elements. |
The compiled page looks like below.
OUTPUT