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





Category:
Web Tutorial
Sub Category:
HTML Form Attributes
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference