Why is "lowercase with dash" the standard for HTML classes?
Possible duplicate:
Why are dashes preferred for CSS selectors / HTML attributes?
Personally, I use "lowercase with dash" to format my HTML classes, which seems to be the standard these days. Using something like the camel case seems to be more restrained for JavaScript in my eyes, but I understand that only my opinion.
I am trying to improve the consistency of code in my workplace and part of this will be a coding guide. Rather than just saying βwe have to do it this way,β I really want to hear some good reasons for this general trend.
So the question in general is, what are some valid technical reasons for the "lowercase with dash" trend for HTML classes?
source to share
As you mentioned in your own question but I realise that just my opinion
.
Coding conventions:
- rules for reading code (number of spaces for identification, naming of variables, ..)
- is in no way a limit in your coding
- for each language
In short, this is just a suggested coding way that you don't need to follow, but it is more readable for other people if you do.
If you come across one set of conventions, it means that many people agree with this set and accept it for themselves (with or without some changes =))
Some languages ββlimit conventions a bit (for example, class names must start with a capital letter, ..), so it differs for different languages.
source to share