Is it okay to do this?
so I can use JavaScript to d
Yes. There are certain attributes that may be specified on every html element. id
and class
are among them.
For a complete list in the html5 spec: http://developers.whatwg.org/elements.html#global-attributes
The spec for the link element: http://developers.whatwg.org/semantics.html#the-link-element
And in html4.1: http://www.w3.org/TR/html401/struct/links.html#h-12.3