HTML spellcheck Attribute

HTML spellcheck Attribute: This attribute specifies whether the element is to have its spelling and grammar checked or not. The following can be spellchecked:

  • Text values in input elements (not password)
  • Text in <textarea> elements
  • Text in editable elements

HTML spellcheck Attribute

This attribute can be applied to all the HTML elements.

Syntax: <element spellcheck=”true|false”>

Browser Support

This attribute is supported by the following attributes:

  • Chrome – 9.0
  • Firefox – 2.0
  • Internet Explorer – 10.0
  • Safari – 5.1
  • Opera – 10.5

Example: for spellcheck attribute

<!DOCTYPE html>
<html>
<body>
<p contenteditable="true" spellcheck="true">This is a praggagraph. It is editable. Try to change the text.</p>
First name: <input type="text" name="fname" spellcheck="true">
</body>
</html>

Output:

HTML spellcheck attribute