Lets say I have a div like this:
<div id="test" class="sourcecode">
"Some String"
</div>
Is it possible to have css and js to highlight a portion of that string based on a search query?
Like if I was searching for the word Stri it would just highlight that part?
You’ll have to divide the text, separating the highlighted part into a
<span>. Like this.To do characters that represent HTML tags, if you have:
…you can highlight the same way as before: