A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

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

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

0

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

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Set the spellcheck attribute to false

Usually, when 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 then the spell checker would not appropriate. In such situations you can disable this spell checking in HTML forms by setting the spellcheck attribute to false, like spellcheck="false". Let's check out an 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>
 

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now