spellcheck
Turns spell checking in a field on or off.
Syntax
<textarea spellcheck="false"></textarea>Parameters
| Parameter | Type | Description |
|---|---|---|
| spellcheck | true | false | Turn spell checking on or off. |
Examples
Type a misspelled word into each field:
<p><textarea rows="2">Ths is a mistke</textarea></p>
<p><textarea rows="2" spellcheck="false">const usrNme = 1;</textarea></p>Notes
Turn it off in fields for code, usernames, addresses and other values where red underlines only get in the way. Whether checking actually happens is up to the browser and the user's settings.
See also
- <textarea> — A multi-line text field.
- contenteditable — Makes an element's content editable right on the page.
- autocomplete — Tells the browser which saved data to fill into a field.
Related recipes
In the tutorial
- Attributes — How HTML attributes work, the global attributes id, class, title, lang, hidden and style, boolean attributes and data attributes.