<p>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>

<pre><code>&lt;p height="30"&gt;
</code></pre>

<p>I want to apply a <code>class="h30"</code> 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 <code>id</code> or <code>class</code>. Help?</p>

Attributes are just properties (usually). So just try:
```
```
for (e in ...) {
    if (e.height == 30) {
        e.className = "h30";
    }
}
```
```
Or use something like jquery to simplify this kind of stuff.