English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The spellcheck global attribute is an enumeration attribute that defines whether spelling errors in elements can be checked. It can have the following values: true, set to check the spelling errors of element content when possible; false, set to turn off spell check of element content when possible.
This attribute is just a hint on the browser: the browser will not force a spell check of spelling errors, usually non-editable elements will not be checked for spelling errors, even if its spellcheck attribute is set to true and the browser supports spell check.
Editable paragraph with spellcheck:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML spellcheck attribute usage (Basic Tutorial Website oldtoolbag.com)/title> </head> <body> <p contenteditable="true" spellcheck="true">This is a paragraph that can be edited. You can try to modify or delete it./p> First name: <input type="text" name="fname" spellcheck="true"> <p><strong>Note:/The spellcheck attribute is not supported in Internet Explorer 9 and earlier versions./p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
Internet Explorer 10, Firefox, Opera, Chrome, and Safari browsers support the spellcheck attribute.
Note: Internet Explorer 9 and earlier IE versions do not support the spellcheck attribute.
The spellcheck attribute specifies whether the spelling and grammar of the element should be checked.
The following text can be spell-checked:
text value in input elements (not password)
text in <textarea> elements
text in editable elements
The spellcheck attribute is a feature of HTML5 New Feature
<element spellcheck="true|false">
Value | Description |
---|---|
true | It is specified that the text of the element should be spell-checked. |
false | It is specified that the text of the element should not be spell-checked. |