Course Content
HTML Introduction
0/1
HTML Editors
0/1
HTML Basic Tags
0/1
HTML Elements
0/1
HTML Attributes
0/1
HTML Headings
0/1
HTML Paragraph
0/1
HTML Text Formatting
0/1
HTML Meta Tags
0/1
HTML Quotations
0/1
HTML Comments
0/1
HTML Images
0/1
HTML Background
0/1
HTML Colors
0/1
HTML Lists
0/1
HTML Tables
0/1
HTML Forms
0/1
HTML Spell Check
0/1
HTML Media
0/1
HTML Marquees
0/1
HTML CSS
0/1
HTML Links
0/1
HTML Block & Inline
0/1
HTML Classes
0/1
HTML Id
0/1
HTML I frames
0/1
HTML Java script
0/1
HTML File paths
0/1
HTML Layout
0/1
HTML Responsive
0/1
HTML Computer Code
0/1
HTML Tutorial
About Lesson

HTML Spellcheck

In this tutorial, we will learn about spellcheck attribute in HTML with the help of examples.


Spellcheck Attribute

Spellcheck attribute is used to detect grammatical mistakes in the text fields. It can be applied to HTML forms inside the <input> element.
The Spellcheck attribute is an enumerated attribute that is used to define whether the HTML element will be checked for errors or not.

  • The spellcheck attribute can be used with “input” and “textarea” Elements.
  • The spell check attribute has two values:
    1. True: The true value defines that the HTML element should be checked for errors.
    2. False: the false value defines that the HTML elements should not be checked for errors.
  • If the attribute is not set, it will take the default value which is element type or browser defined.

Enable Spellcheck Attribute

To enable spellcheck attribute in an HTML form the value is set to true .

Example :

<!DOCTYPE html>
<html>
  <head>
    <title>Enable Spellcheck</title>
  </head>
  <body>
    <h3>Enable Spellcheck</h3>
    <p>
      <input type = "text" spellcheck = "true"/>
    </p>
    <p>
      <textarea spellcheck = "true"></textarea>
    </p>
  </body>
</html>

Output

Enable Spellcheck

 


Disable Spellcheck Attribute

To disable spellcheck attribute in an HTML form the value is set to false .

Example :

<!DOCTYPE html>
<html>
  <head>
    <title>Disable Spellcheck</title>
  </head>
  <body>
    <h3>Enable Spellcheck</h3>
    <p>
      <input type = "text" spellcheck = "false"/>
    </p>
    <p>
      <textarea spellcheck = "false"></textarea>
    </p>
  </body>
</html>

Output

Disable Spellcheck

 

 

error: Content is protected !!