Check out example codes for "change highlight color html". It will help you in understanding the concepts better.

Code Example 1

::-moz-selection { /* Code for Firefox */
  color: red;
  background: yellow;
}

::selection {
  color: red;
  background: yellow;
}

Learn ReactJs, React Native from akashmittal.com