how to change the color of text selection in css code example
Example 1: custom selection color css
::selection {
color: #000000;
background-color: red;
}
/* for firefox */
::moz-selection {
color: #000000;
background-color: red;
}
Example 2: css mark color
<style>
mark {
background-color: yellow;
color: black;
}
</style>
<mark>Highlighted text!!</mark>