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