pseudo-element

::grammar error — CSS reference

Highlights ranges identified by the browser as grammatical errors. The browser decides which text is marked; this cannot implement a grammar checker. Only the supported subset of highlight properties applies. Do not make important information depend solely on color.

Formal Syntax & Structure

css syntaxcss
::grammar-error { color: red; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>::grammar-error</title><style>body{margin:8px;background:white;color:black;font:16px/20px sans-serif}*{box-sizing:content-box}#a{color:green}::grammar-error{color:red}</style><body><p id="a" contenteditable="true" spellcheck="true">Example editable text.</p></body></html>
CSS Reference