HTML 5: SPELLCHECK
SpellCheck specifies if the element must have its spelling and grammar checked.
The spellcheck attribute specifies whether the element should have its spelling checked.
The following text can be spellchecked:
BROWSER COMPATIBILITY
EXAMPLE
The spellcheck attribute specifies whether the element should have its spelling checked.
The following text can be spellchecked:
- The text values in input elements (not password)
- The text in <textarea> elements
- The text in editable elements.
BROWSER COMPATIBILITY
In other words:
- In the absence of the
spellcheck
attribute, Firefox offers as-you-type spellcheck<textarea>
elements but not<input type=text>
elements. It treats thespellcheck
attribute with atrue
orfalse
value as a signal to offer as-you-type spellcheck (or turn it off where it defaults to on). All invalid markup variations are ignored, in the sense that they do not change Firefox's per-element-type defaults. It lets the user turn spellcheck on and off on a per-element basis, which overrides both thespellcheck
attribute and the browser's per-element-type defaults. - Google Chrome offers as-you-type spellcheck on
<textarea>
elements but not<input type=text>
elements. It ignores thespellcheck
attribute entirely. It does not offer the end user the option to change the default behavior or manually check individual fields. - Safari 3 offers as-you-type spellcheck on
<textarea>
and<input type=text>
elements. It ignores thespellcheck
attribute entirely. It allows the user to toggle as-you-type spellcheck globally, which immediately affects all elements of all types. It does not offer the end user the option to change the default behavior or manually check individual fields. - Opera 9 offers spellcheck from the context menu on
<textarea>
and<input type=text>
elements. It ignores thespellcheck
attribute entirely. It does not offer as-you-type spellcheck.
EXAMPLE
This is a paraggragraph. It is editable. Try to change this text.
Code:
<p contenteditable="true" spellcheck="true"> This is a paraggragraph. It is editable. Try to change this text.</p>
Comments
Post a Comment