html tutorial - spellcheck Attribute in HTML - html5 - html code - html form




Spellcheck attribute in html

Learn html - html tutorial - Spellcheck attribute in html - html examples - html programs

  • The spellcheck attribute describes whether the element is to have its grammar and spelling checked or not.
  • The following may be spellchecked:
    • Text values in input elements
    • Text in <textarea> elements
    • Text in editable elements

Syntax for spellcheck attribute in HTML:

<element spellcheck="true|false">

Difference between HTML 4.01 and HTML 5 for spellcheck Attribute:

HTML 4.01

  • The spellcheck attribute has not been defined.

HTML 5

  • The spellcheck attribute is added newly.

Applies To:

Element Attribute
All HTML Elements spellcheck

spellcheck Attribute Values:

Value Description
true Defines if the element is to have its spelling and grammar checked.
false Defines if the element is not being checked.

Sample Coding for spellcheck Attribute in HTML:

Tryit<!DOCTYPE html>
<html>
    <body>
    <p contenteditable="true" spellcheck=”true”>
        Wikitechy is an enhanccced tutorials zone providing the best learning curve.  
    </p>
    </body>
</html>

Code Explanation for spellcheck Attribute in HTML:

spellcheck Attribute Code Explanation

  1. <p> tag is used to defined the content in a paragraph.
  2. contenteditable is an attribute, which describes if the content of an element is editable or not.
  3. spellcheck attribute describes whether the element have its grammar and spelling checked or not.

Output for spellcheck Attribute in HTML:

spellcheck Attribute Output

  1. The output has been displayed.
spellcheck Attribute Output
  1. When user try to edit the content then it will be check the grammar and spelling, here the text enhanccced spelling is wrong, so the red line has been shown under the word enhanccced.

Browser Support for spellcheck Attribute in HTML:

9.0 10.0 2.0 5.1 10.5

Related Searches to spellcheck Attribute in html