The spellcheck
attribute uses values of true or false (you cannot simply add the spellcheck attribute to a given element):
<!-- spellcheck everything! -->
<input type="text" spellcheck="true" /><br />
<textarea spellcheck="true"></textarea>
<div contenteditable="true" spellcheck="true">I am some content</div>
<!-- spellcheck nothing! -->
<input type="text" spellcheck="false" /><br />
<textarea spellcheck="false"></textarea>
<div contenteditable="true" spellcheck="false">I am some content</div>
You can use spellcheck on INPUT
, TEXTAREA
, and contenteditable
elements. Thespellcheck
attribute works well paired with the autocomplete, autocapitalize, and autocorrect attributes too!
Added from David Walsh's article on Spell Check.