How many number of CSS classes can be assigned for an HTML element.
I don't think there's a limit. A quick Google search yielded this.
The standard does not specify any limitation, but individual browsers may have practical ones.
There are no such limitations imposed by the specification:
The attribute, if specified, must have a value that is a set of space-separated tokens representing the various classes that the element belongs to.
A set of space-separated tokens is a string containing zero or more words separated by one or more space characters, where words consist of any string of one or more characters, none of which are space characters.of which are space characters.
I'm pretty sure IE6 only supports up to 2. Modern browers have no limit as far as i know.
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