HTML5 spellcheck attribute with demo
- The HTML5 spellcheck attribute specifies whether or not the spelling or grammar checking feature is enabled for an element.
- The spellcheck attribute is introduced in HTML5 to allow to check spelling mistakes of the editable text.
- This feature uses the contentEditable attribute to find spelling mistakes in Web page.
- The spellcheck attribute is supported in all major browsers like IE 10, Firefox, opera, chrome and safari. The spellcheck attribute is not supported in IE 9 and earlier versions.
Syntax:
<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 behaviour from its parent element.
Example:
0 comments:
Post a Comment