HTML spellcheck Attribute
Example
<p contenteditable="true" spellcheck="true">This is a paragraph.</p>
Meaning
The spellcheck attribute is set to either true or false and indicates whether the content enclosed by the element should be spelling and grammar checked.
If it has no value, the assumed value is true unless it inherits false from an enclosing parent.
Values:
- When "true" value is set or the empty string (""), browsers will commonly underline misspelled words in red and provide alternatives in a context menu.
- When "false" value is set, browsers will avoid checking the element's content for spelling errors.
Note: Not supported in HTML 4.01.
Standard Syntax
<element spellcheck="true|false">
Browser Support
Status
Applies to:
The spellcheck attribute can be used on the following element:
Element | Attribute |
---|---|
All HTML elements. | spellcheck |
Attribute Values
Value | Description |
---|---|
true | Specifies the element is to have it's spelling and grammar checked |
flase | Specifies the element is not to be spelling and grammar checked |