Skip to main content
Home / Code Snippets / CSS / Change Text Selection Color

Change Text Selection Color

::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

ChromeOperaFirefoxIEEdgeSafari
49.5-9.62*9123.1

Mobile / Tablet

iOS SafariOpera MobileOpera MiniAndroidAndroid ChromeAndroid Firefox
No11.5No4.47567

(More info)

icon-link icon-logo-star icon-search icon-star