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:
Code Explanation for spellcheck Attribute in HTML:
<p> tag is used to defined the content in a paragraph.
contenteditable is an attribute, which describes if the content of an element is editable or not.
spellcheck attribute describes whether the element have its grammar and spelling checked or not.
Output for spellcheck Attribute in HTML:
The output has been displayed.
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.