English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML spellcheck attribute

The spellcheck global attribute is an enumeration attribute that defines whether spelling errors in elements can be checked. It can have the following values: true, set to check the spelling errors of element content when possible; false, set to turn off spell check of element content when possible.

HTML Global Attributes

This attribute is just a hint on the browser: the browser will not force a spell check of spelling errors, usually non-editable elements will not be checked for spelling errors, even if its spellcheck attribute is set to true and the browser supports spell check.

Online Example

Editable paragraph with spellcheck:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML spellcheck attribute usage (Basic Tutorial Website oldtoolbag.com)/title>
</head>
<body>
<p contenteditable="true" spellcheck="true">This is a paragraph that can be edited. You can try to modify or delete it./p>
First name: <input type="text" name="fname" spellcheck="true">
<p><strong>Note:/The spellcheck attribute is not supported in Internet Explorer 9 and earlier versions./p>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Internet Explorer 10, Firefox, Opera, Chrome, and Safari browsers support the spellcheck attribute.

Note: Internet Explorer 9 and earlier IE versions do not support the spellcheck attribute.

Definition and Usage

The spellcheck attribute specifies whether the spelling and grammar of the element should be checked.

The following text can be spell-checked:

  • text value in input elements (not password)

  • text in <textarea> elements

  • text in editable elements

HTML 4.01 between HTML5differences

The spellcheck attribute is a feature of HTML5 New Feature

Syntax

<element spellcheck="true|false">

Attribute Value

ValueDescription
trueIt is specified that the text of the element should be spell-checked.
falseIt is specified that the text of the element should not be spell-checked.
HTML Global Attributes