0

multiple classes

Hey guys, could you please answer if an element may contain many classes for example <p class="first" class="color"> if this is true? how they are properly organised? Thanks)

4th May 2017, 9:46 AM
Dmytro Malov
Dmytro Malov - avatar
3 Réponses
+ 5
yes, one HTML element can have multiple classes. you don't have to use multiple 'class' attribute to add multiple classes. instead you will add single 'class' attribute and attribute value should be multiple class name separated by space. WRONG WAY: <p class="first" class="color"></p> RIGHT WAY: <p class="first color"></p>
4th May 2017, 10:40 AM
Apel Mahmod
Apel Mahmod - avatar
+ 1
Yes, but your css syntax is wrong. <p class="first color">
4th May 2017, 10:01 AM
Calviղ
Calviղ - avatar
0
thanks a lot guys)))) good answers now I will know
4th May 2017, 11:01 AM
Dmytro Malov
Dmytro Malov - avatar