44

Any attributes or some tweak to ignore the red-colored underline? or it's ignoreable due to browser settings?

enter image description here

Prashanth Sams
  • 19,677
  • 20
  • 102
  • 125
  • 10
    `spellcheck="false"` https://html.spec.whatwg.org/multipage/interaction.html#spelling-and-grammar-checking – N.J.Dawson Aug 30 '16 at 07:13
  • Perhaps a different problem, but should you try to make your search engine account for misspellings? Solutions just as elasticsearch and solr can do this automatically and are really fast. – jedifans Aug 30 '16 at 07:14

2 Answers2

20

It's not CSS but HTML: spellcheck="false" in your HTML element should do the trick. But I think Safari for example still draws a red line under it.

mxlse
  • 2,654
  • 17
  • 31
6

It's only possible to do this using HTML5. So you can add the spellcheck attribute to HTML element by using jquery. Try this

$("#textarea").attr("spellcheck", "false");
War10ck
  • 12,387
  • 7
  • 41
  • 54
Zolisa Welani
  • 101
  • 1
  • 4
  • 1
    Its not the better way, but if you want it, then use: – BratisLatas Nov 12 '19 at 10:58
  • This is probably something that should be added to the HTML directly, instead of dynamically using JS after the page has already been served to the user. – Martin Oct 31 '22 at 15:42