Using multiple classes within one selector
HTML allows you to add multiple classes to an HTML element. For example you can add two classes in to an <h1> .
Two different classes are written within the same attribute with spaces separating each class as above image shows.
The advantage of using multiple classes within the same attribute is that you can write a CSS properties to select either of the classes and they both affect the same element. as like this
You can also write a same CSS properties/rules for two different classes by written directly after each another as like this.
Two different classes are written within the same attribute with spaces separating each class as above image shows.
The advantage of using multiple classes within the same attribute is that you can write a CSS properties to select either of the classes and they both affect the same element. as like this
You can also write a same CSS properties/rules for two different classes by written directly after each another as like this.