I use PrimeFaces component but I don't understand difference between styleClass and class. I can use both of them and I don't see any difference. What is the difference between class and styleClass attributes in PrimeFaces?
In fact in JSF and Primefaces:
styleClassis used to specify classes to JSF components, it will be then converted to a
classattribute in the rendered HTML code.
classattribute is used with HTML elements, and can't be used directly with JSF components.
And when you open any JSF tag documentation, you will see that:
The styleClass attribute sets the CSS class to apply to this component when it is rendered.
You can see JSF h:outputText tag for example.