I'm reading different opinions on this. Is this allowed in CSS HTML5:
<div class="one-class another-class">...
to apply the properties of both one-class
and another-class
to the element?
Re the downvote: yes, I tried it, and it does work. But that doesn't mean it's good practice. It could be deprecated for instance.
Yes, that is allowed.
The class
attribute according to the HTML specification:
"This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters."
http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With