I would like to turn off the built-in spellcheck functionality in certain browsers such as Firefox and Opera on a textarea that contains HTML embed code for visitors to copy and paste. This can be done with following attribute: However, this causes a validation error for XHTML Strict. Also, it doesn't work properly in Opera, because the spell checking returns after a user selects the embed code in the text area. Is there another method for turning off spell check functionality?
Use Javascript: document.getElementById('textarea').setAttribute('spellcheck', 'false'); or getElementsByTagName if there are more than 1 textarea, and for loop to set them all