Why is “lower-case with dashes” the standard for HTML classes? [duplicate]

人盡茶涼 提交于 2019-12-05 18:23:01

Just like you mentioned in your own question but I realise that's just my opinion.

Coding-conventions are:

  • guidelines for making code more readable (amount of spaces for identation, naming of variables, ..)
  • in no way a limit in your coding
  • different for every language

In short, it's only a proposed way of coding which you don't need to follow but it's more readable for other people if you do.

If you come across one set of conventions, it means a lot of people agree with that set and adopt it for themselves (with or without some modifications =) )

Some languages restrict conventions a bit (like class names having to start with an uppercase letter, ..), that's why it's different for every language.

There are none. It's an acceptable naming convention, to help the author from confusing between his different languages. You can name your class names in any way you'd like.

Coding Conventions are just that: conventions.

What is a convention? It's some rule how to do things?

Why is it like that? Because someone said so.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!