The differences between pseudo-class and ordinary class are:
- We can use any string for a class but we cannot use any string for a pseudo-class. Pseudo-classes are predefined. They are: last-child, only-child, invalid,hover, focus, visited, etc.
- In a selector, we prefix a dot for a class while we prefix a colon for a pseudo-class.
- We need to specify a class in the class attribute of an element to apply the css rule including the class selector to the element. But we shall not write a pseudo-class in the class attribute of an element. A css rule including a pseudo-class selector will automatically apply to all elements selected by that selector. pseudo-class selectors can be used independently, or combined with other selectors.