2. Class selector:
A class selector targets all elements with a specific class attribute value. It is represented by a period followed by the class name. For example, to target all elements with the class "my-class", you would use the ".my-class" selector: