Here’s how to change the text selection color using CSS.
1. Suppose this is the text you want to change the color on selection.
2. You can either target the single element, h1 in this case, h1::selection. Or apply it to all the elements like below.
Output:
Select this text
If you have any doubts or stuck somewhere, you can reach out through Coding Yaar's Discord server.