pseudo-element
::spelling error — CSS reference
Highlights ranges identified as spelling errors. Actual dictionaries and browser spellchecking determine which text receives the highlight. Only the supported subset of highlight properties applies. Do not make important information depend solely on color.
Formal Syntax & Structure
css syntaxcss
::spelling-error { color: red; }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>::spelling-error</title><style>body{margin:8px;background:white;color:black;font:16px/20px sans-serif}*{box-sizing:content-box}#a{color:green}::spelling-error{color:red}</style><body><p id="a" contenteditable="true" spellcheck="true">Example editable text.</p></body></html>