Javatpoint Logo
Javatpoint Logo

HTML 5 Spellcheck attribute

In this article, we will understand the working of the HTML5 spellcheck attribute.

What do you mean by the Spellcheck attribute?

In HTML 5, the spellcheck attribute identifies grammar or spelling mistakes in HTML text fields, textarea elements, and content editable attributes. The attribute returns the color resolution of the visitor's screen.

Syntax

In the above syntax, the tag name is an input element or tag in html. The spellcheck attribute has a true or false value which defines that spellcheck attribute is enabled or disabled.

Let's take the following examples of the HTML 5 spell check attribute.

Example 1: Enable HTML 5 spell check attribute in textarea input type.

Explanation:

In the above example, we have created an example of enabling spell check attribute in the input type text area. We have passed the value of spell check ="true".

Output:

Following is the output of this example.

HTML 5 Spellcheck attribute

Example 2: Disable HTML 5 spell check attribute in textarea input type.

Explanation:

In the above example, we have created an example of disabling the spell check attribute in the input type text area. We have passed the value of spell check ="false".

Output:

Following is the output of this example.

HTML 5 Spellcheck attribute

Example 3: How to enable HTML 5 spell check attribute in input type text.

Explanation:

In the above example, we have created an example of how to enable spell check attribute in the input type text field.

Output:

Following is the output of this example.

HTML 5 Spellcheck attribute

Example 4: How to disable HTML 5 spell check attribute in input type text.

Explanation:

In the above example, we have created an example of disabling the spell check attribute in the input type text field.

Output:

Following is the output of this example.

HTML 5 Spellcheck attribute

Example 5: How to enable and disable HTML 5 spell check attribute with content editable attribute.

Explanation:

We have created an example of enabling and disabling the spell check attribute in the content editable attribute in the above example. In this, in the first tag, we have enabled the spell check attribute & in another tag spell check attribute is disabled.

Output:

Following is the output of this example.

HTML 5 Spellcheck attribute





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA