I can't quite figure it out, I'm looking for some code that will add an attribute to an HTML element.
For example lets say I have a string with an <a>
in it, and that <a>
needs an attribute added to it, so <a>
gets added style="xxxx:yyyy;"
. How would you go about doing this?
Ideally it would add any attribute to any tag.