CSS ::spelling-error pseudo-element

Definition and usage

CSS ::spelling-error Pseudo-elements are used to set the style for the text marked as misspelled by the browser.

Note:The following properties can be combined with ::spelling-error Used together:

  • color
  • background-color
  • cursor
  • caret-color
  • outline
  • text-decoration
  • text-emphasis-color
  • text-shadow

Example

Set the style for the text marked as misspelled by the browser:

::spelling-error {
  text-decoration: underline red;
  color: red;
}

Try it yourself

CSS syntax

::spelling-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 the pseudo-element.

Chrome Edge Firefox Safari Opera
121 121 Not supported 17.4 107

Related Pages

Tutorial:CSS Pseudo-elements