spellcheck Attribute:
It is used to specify whether to check the spelling and grammar of the text in an editable html element. This attribute can be used with input elements, textarea and other editable html elements.
Syntax:
<element spellcheck="true|false">
spellcheck Attribute Values:
Value |
Description |
true |
Elements spelling and grammar will checked |
false |
Elements spelling and grammar not to be checked |
Example:
<!DOCTYPE html>
<html>
<body>
<!-- It will check spellings in both input field and textarea ! -->
<input type="text" spellcheck="true" /><br />
<textarea spellcheck="true"></textarea>
<!-- It will not perform spellcheck in both fields ! -->
<input type="text" spellcheck="false" /><br />
<textarea spellcheck="false"></textarea>
</body>
</html>
0 Comment(s)