CSS ::grammar-error pseudo-element
- Forrige side ::first-line
- Næste side ::highlight()
- Gå tilbage til niveauet over CSS pseudo-element referencehåndbog
Definition and usage
CSS ::grammar-error
Pseudo-elements are used to set the style of the text marked as a syntax error by the browser.
Note:The following properties can be used with ::grammar-error
Used together:
- color
- background-color
- cursor
- caret-color
- outline
- text-decoration
- text-emphasis-color
- text-shadow
Example
Set the style of the text marked as a syntax error by the browser:
::grammar-error { text-decoration: underline red; color: red; }
CSS syntax
::grammar-error { css declarations; }
Technical details
Version: | CSS Pseudo-elements Module Level 4 |
---|
Browser support
The numbers in the table specify the first browser version that fully supports this pseudo-element.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
121 | 121 | Not supported | 17.4 | 107 |
Related pages
Manual:CSS pseudoelement
- Forrige side ::first-line
- Næste side ::highlight()
- Gå tilbage til niveauet over CSS pseudo-element referencehåndbog