HTML Guides for false
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
The autocomplete attribute isn't a true/false switch: to turn autofill off on a <textarea>, write autocomplete="off", not autocomplete="false".
On a <textarea>, as on <input> and <select>, autocomplete takes either on or off, or autofill field names such as street-address that tell the browser what data the field expects. true and false belong to other attributes, like spellcheck and contenteditable, and the validator rejects autocomplete="true" too.
An invalid value doesn't fail safe. The HTML standard treats a value it can't parse as if the attribute weren't there, so the <textarea> falls back to its form's autocomplete setting. Unless the form says off, autofill stays on, which is the opposite of what false was meant to do.
With autocomplete="off", the browser should not save what the user types in the field or suggest values typed before. Browsers treat it as a request. The standard lets them allow users to override it, and most browsers ignore off on login fields so password managers keep working. On an ordinary message field, removing the attribute is also a valid fix.
If the goal was to stop the red underlines or the automatic corrections, those have their own attributes. spellcheck="false" turns off spelling and grammar checking, and autocorrect="off" tells the browser not to correct words as the user types. Watch the values: spellcheck takes true and false, but autocorrect takes on and off like autocomplete, so autocorrect="false" is also an error.
Invalid example
<form action="/contact" method="post">
<label for="message">Message</label>
<textarea id="message" name="message" rows="6" autocomplete="false"></textarea>
<button type="submit">Send</button>
</form>
Valid example
<form action="/contact" method="post">
<label for="message">Message</label>
<textarea id="message" name="message" rows="6" autocomplete="off"></textarea>
<button type="submit">Send</button>
</form>
To turn off spell checking and autocorrection instead:
<label for="snippet">Code snippet</label>
<textarea id="snippet" name="snippet" rows="6" spellcheck="false" autocorrect="off"></textarea>
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries