Special welcome gift. Get 50% off your first courses with code “AS50”. Find out more!

HomeCoachingInterviewCSS Q/AWhat is the CLASS selectors used for?
courses 18

What is the CLASS selectors used for?

Answer:

Class selectors are the selectors which are stand alone to a specific style that is declared. Class attribute can be used to declare the style and make an association with any HTML element.

The syntax for creation of class selector is: .classname.
The name can be from a-z, A-z or in digits.

The example code is shown below:

.head{font: 12em;}, this is a class selector
<Body class= “head”> this is the class that is associated with the element </body>.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

Categories

ads sidebar 1

You May Also Like

It’s about making websites work wherever the web is. Different devices with different sizes and different capabilities. Responsive design is...
It’s an alternative to graceful degradation, which concentrates on the matter of the web. The functionality is same, but it...