Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

An “input” element with a “type” attribute whose value is “hidden” must not have an “autocomplete” attribute whose value is “on” or “off”.

The autocomplete attribute is used to control if the browser can provide assistance in filling out form field values, and it only makes sense for visible, not hidden, inputs.

It is available on <input> elements that take a text or numeric value as input, <textarea> elements, <select> elements, and <form> elements.

To fix this issue, you can remove the autocomplete attribute from the input element with type=hidden. Here is an example:

<!-- Wrong code -->
<input type="hidden" name="phone" value="12345" autcomplete="off">

<!-- Correct code -->
<input type="hidden" name="phone" value="12345">

Learn more:

Related W3C validator issues