Horje
How to create Autocomplete Attribute for HTML Form

The autocomplete attribute specifies whether a form should have autocomplete on or off.

When autocomplete is on, the browser automatically complete values based on values that the user has entered before.


Introduction Code of The Autocomplete Attribute for HTML Form

 <form action="/action_page.php" autocomplete="on"> 

Full Example of The Autocomplete Attribute for HTML Form

A form with autocomplete on:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The form autocomplete attribute</h1>

<p>Fill in and submit the form, then reload the page, start to fill in the form again - and see how autocomplete works.</p>

<p>Then, try to set autocomplete to "off".</p>

<form action="/action_page.php" autocomplete="on">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="email">Email:</label>
  <input type="text" id="email" name="email"><br><br>
  <input type="submit">
</form>

</body>
</html>

Output should be:

Full Example of The Autocomplete Attribute for HTML Form





Related Articles
How to create HTML Action Attribute HTML Form Attributes
How to add HTML Target Attribute in Form Action HTML Form Attributes
How to create The Method Attribute in HTML Form HTML Form Attributes
How to create Autocomplete Attribute for HTML Form HTML Form Attributes
What is HTML The Novalidate Attribute for HTML form and How to create it HTML Form Attributes

Single Articles
Introduction Code of The Autocomplete Attribute for HTML FormHTML Form Attributes
Full Example of The Autocomplete Attribute for HTML FormHTML Form Attributes

Read Full:
HTML Form Attributes
Category:
Web Tutorial
Sub Category:
HTML Form Attributes
Uploaded by:
Admin
Views:
74


Reffered: https://www.w3schools.com/html/html_forms_attributes.asp