How to Programmatically Highlight Text with the CSS Custom Highlight API
You can highlight text in the browser by clicking and dragging through the desired text. And sometimes this works fine. But there are times when you’ll want to programmatically highlight some text in an HTML document.
In this article, I’ll discuss a ...
freecodecamp.org9 min read