CSS ::grammar-error Pseudo-element
- Previous Page ::first-line
- Next Page ::highlight()
- Go to the Previous Level CSS Pseudo-element Reference Manual
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
Tutorial:CSS Pseudo-element
- Previous Page ::first-line
- Next Page ::highlight()
- Go to the Previous Level CSS Pseudo-element Reference Manual