HTML spellcheck Global Attribute

Description

The global attribute spellcheck tells the browser to check whether or not the spelling and grammar in the text of the element.

This attribute is used in the following cases:

  • Text values ​​in <input> elements (exception type = "password" )
  • The text in the <textarea> element
  • Text in editable elements ( with global attribute contenteditable="true" )

Syntax

<element spellcheck="true | false">

Values

  • trueTells the browser to check the spelling and grammar in the text of the element.
  • falseTells the browser that the spelling and grammar in the text of the element should not be checked.

Example

<p contenteditable="true" spellcheck="true">Edit this paragraph. Errors will be displayed.</p> 
<p contenteditable="true" spellcheck="false">Edit this paragraph. Errors will not be displayed.</p> 

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
11Yes9YesYesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
474757379.35.0