Change Text Selection Color

Avatar of Chris Coyier
Chris Coyier on (Updated on )
::selection {
  background-color: #FFA;
  color: #000;
}

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

Desktop

ChromeFirefoxIEEdgeSafari
42*9123.1

Mobile / Tablet

Android ChromeAndroid FirefoxAndroidiOS Safari
1221234.4No

(More info)