spellcheck – spell checking (attribute)
<textarea spellcheck="true"></textarea>
Turns spell checking on or off – underlining unknown words with a wavy line and suggesting corrections. By default the browser does it in textarea and in editable content, for single-line fields depending on the browser. It chooses the dictionary according to lang and the browser settings.
Values
true– check.false– do not check (codes, names, email addresses, passwords).
- Applies to: all elements, it makes sense on form fields and editable content; it is inherited
- In JavaScript:
element.spellcheck
Examples
Checking turned on for a message, off for a discount code:
<p><label for="s-message">Message</label><br><textarea id="s-message" spellcheck="true" lang="en">Hello, I would like to order some bread.</textarea></p> <p><label for="s-code">Discount code</label><br><input id="s-code" spellcheck="false" autocomplete="off" value="BREAD2026"></p>
Things to watch out for
- Some extensions and browsers (enhanced spell check) send the text to a server for checking. For sensitive data (document numbers, internal notes) it is therefore sensible to turn checking off.
- Spell checking on phones is a matter of the system keyboard;
spellcheckaffects it only partly.
Browser support
Baseline – widely available: in all major browsers since November 2017, considered widely available since May 2020. Since version: Chrome 9, Firefox 2, Safari 5.1. As of October 2026 (MDN browser-compat-data).
Related:
textarea – multi-line text
input – input field
lang – language (attribute)
contenteditable – editable content (attribute)