Spellcheck
The spellcheck attribute is part of the World Wide Web Consortium (W3C)'s HTML5 specification that adds spell checking to input and textarea elements and editable text fields.Internet Explorer 10 and Windows apps using JavaScript support the autocorrect feature for commonly misspelled word (such as "teh" instead of "the"), and the familiar red squiggle on other unrecognized words.
The spellcheck attribute
Spell checking is enabled by default on textarea elements, or an element marked contentEditable. You can disable or enable it by using the spellcheck attribute in the HTML element.
<input type="text" spellcheck="true" />
The spellcheck attribute provides three states, as follows.
Keyword | Description |
---|---|
true |
Spell checking is applied to the field. |
false |
Spell checking is not applied. |
none |
If the attribute is missing, spell checking is inherited from the parent element. |
The following example provides spell checking on several elements.
<!DOCTYPE html>
<html>
<head>
<title>Spell check example</title>
</head>
<body>
<body>
<p><input type="text" spellcheck="true" > Input element with type="text"</input></p>
<p><div contenteditable spellcheck="true">Content editable div element</div></p>
<p><textarea spellcheck="true">Text area element </textarea></p>
</body>
</body>
</html>
API Reference
Internet Explorer Test Drive demos
IEBlog posts
Typing with Speed and Accuracy in IE10
Specification
HTML5: Section 7.6.5