You will need some way to manipulate the span
tag. Such as an id
, but then in javascript I would edit some of the style
properties. You could have a property for everything you want to highlight like what is shown below.
.HL {
background: #ffff99;
color: #000000;
}
If you do that then you will need to get a reference to the specific tag.
DocumentgetElementsByTagName("title")
Otherwise Document.getElementByID("ID")
is good for unique ids.
Then using setAttribute(name, value)
To change the class to the one given.
This is just a simple example but there are many ways to do this.
<span id="abc" class=""> Sample </span>
var temp = Document.getelementByID("abc");
temp.setAttribute('class', 'HL');