Is there a maximum number of caracters for the name of a class in CSS ?
The class name can't contain a space, but it can contain hyphens or underscores. Any tag can have multiple space-separated class names.
In CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, two hyphens, or a hyphen followed by a digit.
No , There won't be any limit.
No, it does not.
.thereisnomaximumlengthforaclassnameincss { maxlength: no; }
Good luck! There is no maximum length it says.
No maxiumum.
Basically, a name may start with an underscore (_), a dash (-), or a letter(a–z), and then be immediately followed by a letter, or underscore, and THEN have any number of dashes, underscores, letters, or numbers:
-?[_a-zA-Z]+[_a-zA-Z0-9-]*
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