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)
3 Respuestas
+ 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>
+ 1
Yes, but your css syntax is wrong.
<p class="first color">
0
thanks a lot guys)))) good answers now I will know