Class Selector in CSS
Milap Patel
Technical Manager | Node.js | React | JavaScript | AWS Certified Cloud Practitioner | PHP | WordPress | Front-end | MongoDB | MySQL
A class selector in CSS starts with a dot (.). A class selector selects all elements with a matching class attribute.
You can give a class any name that starts with a letter, hyphen (-), or underscore (_). You can use numbers in class names, but a number can’t be the first character or the second character after a hyphen.
An element can have more than one class. An element with multiple classes is styled with the CSS rules for each class. You can also combine multiple classes to select elements.