I am trying to apply styles to HTML tags dynamically by reading in the value of certain HTML attributes and applying a class name based on their values. For instance, if I have:
<p height="30">
I want to apply a class="h30"
to that paragraph so that I can style it in my style sheet. I can't find any information on getting the value of an attribute that is not an id
or class
. Help?