How to disable spell checking from Input Box and Textarea in HTML forms

Topic: HTML / CSS« Prev  |  Next »

Answer: Set the attribute spellcheck="false"

If you enter the grammatically incorrect words inside <input> or <textarea> fileds in an HTML form you will see the red underline below the incorrect words.

This is the default behavior of Chrome and Firefox. However if you are using the input fields or text areas for editing the code or other non-prose data spell checker would not appropriate. In such situation you can disable this spell checking in HTML forms by setting the spellcheck attribute to false, like spellcheck="false".

  • <!DOCTYPE html>
  • <html lang="en">
  • <head>
  • <meta charset="UTF-8">
  • <title>Disable Spell Checking</title>
  • </head>
  • <body>
  •     <form>
  •         <p>
  •             <input type="text" spellcheck="false">
  •         </p>
  •         <p>
  •             <textarea spellcheck="false"></textarea>
  •         </p>
  •         <button type="reset">Reset</button>
  •     </form>
  • </body>
  • </html>

Tip:To disable the spell checking in the entire form at once — just set the spellcheck="false" in the <form> tag, like <form spellcheck="false">.

Related FAQ

Here are some more FAQ related to this topic:


Your Feedback:


We would love to hear from you! Please say something.