javascript - How bad is it to add other attribute to an element or what other options are there? -


I have elements where I'm already using the rel attribute, but I would also like to add another feature that I am using in JavaScript.

  & lt; A href = "/" rel = "blah" foo = "bar" & gt; Link & lt; / A & gt;  

Is it OK to add other attributes? Or is there a better option?

I will use the attributes even if you are not using HTML5, So you can make sure that your work will still work and prospect is proven.

Like

  & lt; Li class = "user" data-city = "Boston" data-feeding = "bacon" & gt;  

Comments