Checking Spelling Mistakes

The spell check feature is introduced in HTML5 to allow you to check spelling mistakes of the editable text. This feature uses the contentEditable attribute to find spelling mistakes in Web page. The syntax to use the spellcheck attribute is given as follows:

< element spellcheck= [ value ] >

In the preceding syntax, element represents an HTML element and the spellcheck attribute can take any of the following values:

  • true: Checks an element for spelling and grammar if its content is editable
  • false: Does not check an element for spelling and grammar
  • inherit: Specifies that an element inherits the spell check behavior from its parent element

The following code snippet shows an example of using the spellcheck attribute:

< TEXTAREA spellcheck="true" > � � < /TEXTAREA >

Click here for demos to see how to check spelling mistakes:
demo