IMO, it all depends on what style you apply, in addition to the general browser support factors that others have already talked about. For example, if what you apply is absolutely an essential part of your design (e.g. layout), then it is probably safer to stick with the class name.
However, if you use "decorative flowering" and, in particular, if CSS, which is not even supported in older versions of IE anyway (think about the border radius, for starters), then it is better to keep your markup clean and use the attribute selector .
Under similar circumstances, you may find it worthwhile to incrementally use javascript — that is, leave the markup beautiful and clean, but add a class or inline style to the element using JS.
source share