You are here: Reference > JavaScript > client-side > HTML DOM > properties > spellcheck

spellcheck property

Browser support:
Sets or retrieves whether the automatic spellchecker is enabled.
The internal spellchecker is a great solution in Firefox, Google Chrome and Safari, but useless in most cases, because the user must install different language packs to use it correctly. The browser checks whether the required language pack is installed, and if not, it uses the default. It does not alert the user to install the required language pack, so almost all content will be underlined.


You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: spellcheck

Possible values:

Boolean that indicates the state of spellcheck.
The auto-spellcheck is disabled.
Default. The auto-spellcheck is enabled.
Default: true.

Example HTML code 1:

This example illustrates the use of the spellcheck attribute:
<textarea spellcheck="true">Some content in the textarea</textarea>
<textarea spellcheck="false">Some content in the textarea</textarea>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the spellcheck property:
    <script type="text/javascript">
        function ToggleSpellCheck () {
            var area = document.getElementById ("myArea");

            if ('spellcheck' in area) {
                area.spellcheck = !area.spellcheck;
            } else {
                alert ("Your browser doesn't support this example!");
    <textarea spellcheck="false" id="myArea">Some content in the textarea</textarea>
    <button onclick="ToggleSpellCheck ();">Change the state of spellcheck!</button>
Did you find this example helpful? yes no

Supported by objects:

User Contributed Comments

Post Content

Post Content