html tutorial - How to disable spell checking from Input Box and Textarea in HTML forms - html5 - html code - html form



Answer: Set the attribute spellcheck="false"

    If you enter incorrect words inside <input> or <textarea> fileds in an html form it represent the red underline below the inaccurate words.

    This is the default behavior of Chrome and Firefox. but if you are using the input fields or text areas for writing 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".

    Example

      <!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>

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