EN
HTML - disable input autocomplete
0
points
In this article, we would like to show you how to disable input element autocomplete in HTML.
Quick solution:
<input type="text" autocomplete="off" />
Practical example
In this example, we use the input element's autocomplete="off" attribute to disable the input autocomplete.
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<body>
<form>
<label>
<span>Field 1:</span>
<input type="text" name="field-1" autocomplete="off" />
</label>
<br />
<label>
<span>Field 2:</span>
<input type="text" name="field-2" autocomplete="off" />
</label>
</form>
</body>
</html>
Note:
You can also turn disable autocomplete for the whole
formelement:<form autocomplete="off"></form>