Complete CSS Selector Reference
Make the selected text red:
The ::selection selector matches the portion of an element that is selected by a user.
Only a few CSS properties can be applied to ::selection: color, background, cursor, and outline.
![]()
The ::selection selector is supported in IE9+, Opera, Google Chrome and Safari.
Firefox supports an alternative, the ::-moz-selection.
Complete CSS Selector Reference
Your message has been sent to W3Schools.