HTML spellcheck Attribute

The spellcheck attribute specifies that an element should be checking for spelling errors. It can be applied to elements that accept user input.

Example

#

A spellcheck attribute on a <textarea>.
Click on the textarea so it has focus. This will highlight all the spelling errors.

<textarea spellcheck="true" rows="6" cols="75" >
  Post-Impressionism goos is a predominantly French art movement 
  that developed roughly blirp between 1886 and 1905, from the last 
  Impressionist exhibition maq to the birth of Fauvism. 
  The movement was snep led by Paul Cézanne (known as father of 
  Post-impressionism), glyp Paul Gauguin, Vincent van Gogh, and 
  Georges Seurat.
</textarea>

Using spellcheck

The spellcheck attribute is a hint to the browser to check an element for spelling errors.

This attribute is used with input, textarea, and elements with the contenteditable attribute set to true.

Non-editable elements are usually not checked for spelling errors.

The spellcheck value is inherited. If a parent element has spellcheck set, then its child elements will be spellchecked.

If not set, the browser's default spellcheck functionality will be used.

Note:  The spellcheck attribute is a global attribute that can be applied to any tag.


Syntax

<tag spellcheck="true|false" />

Values

#

Value Description
true Element should be checked for spelling errors.
false Element should not be checked for spelling errors.

Browser support

Here is when spellcheck support started for each browser:

Chrome
9.0 Feb 2011
Firefox
2.0 Oct 2006
Edge
10.0 Sep 2012
Opera
10.5 Mar 2010
Safari
5.1 Oct 2011

You may also like



Guides