Working With AutoComplete Attribute In HTML5

INTRODUCTION

 
In this blog, I will explain the Autocomplete HTML input attribute.
 

HTML input attributes

 
Attributes mean a single atomic unit of an entity.
  1. The value attribute --> specifies the value of the input.
  2. The readonly attribute --> the input values which cannot be changed but we can read.
  3. The disabled attribute --> the value cannot be used in the forms.
  4. The size attribute --> specifies the size of the characters.
  5. 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">
  1. <!DOCTYPE html>  
  2. <html>  
  3.     <body>  
  4.         <title> autocomplete</title>  
  5.         <form action="/blogs.php" autocomplete="on">    
  6. Name:  
  7.             <input type="text" name="name1">  
  8.                 <br>    
  9. Department:  
  10.                     <input type="text" name="name2">  
  11.                         <br>    
  12. E-mail:  
  13.                             <input type="email" name="email" autocomplete="off">  
  14.                                 <br>  
  15.                                     <input type="submit">  
  16.                                     </form>  
  17.                                 </body>  
  18.                             </html>    
 
ATTRIBUTES VALUE DESCRIPTION
Autocomplete On or Off Check whether the autocomplete option is enabled or not, in the input elements.
 
 a
 
The compiled page looks like below. 
 
OUTPUT
 
s