Can someone help me with a javascript function that can highlight text on a web page.
And the requirement is to - highlight only once, not like highlight all occurrences of
Since HTML5 you can use the tags to highlight text. You can use javascript to wrap some text/keyword between these tags. Here is a little example of how to mark and unmark text.