I have an HTML document that contains a bunch of anchors, which have text and a href link. Here is an example of what they look like:
<a href="URL_GOES_HERE"> Some Clickable Text Goes Here </a>
I would like to write a piece of vanilla JS or jQuery code (whichever runs faster) that will highlight keywords (or the whole line, if possible) within the anchors when the page is opened/loaded.
For example, if an anchor contains the word "some", then that word (or preferably the whole line) will be highlighted on page load without me having to use any onclick buttons.
I've spent a few hours trying to do this by looking at other similar question on SO and Google, but they seem to only work if the element has a class or id, and I haven't been able to figure out how to do this with anchors. Any help is appreciated.