Should css class names like 'floatleft' that directly describe the attached style be avoided?

后端 未结 20 2153
谎友^
谎友^ 2020-12-13 08:32

Lots of websites use class names like floatleft, clearfloat, alignright, small, center etc that describe the

20条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 09:18

    If the question is only one of naming, then for one specific class...

    class="floatleft"
    

    or

    class="myClass"
    

    or

    class="gibberish"
    

    ....changes absolutely nothing. They are only different class names. The programming functions the same.

    Either your content & presentation is separated, or it isn't... totally regardless of how you created the names.

提交回复
热议问题