HTML5 Compliant - Trailing Space in Class Attribute

后端 未结 4 2168
心在旅途
心在旅途 2021-01-12 22:20

I know that technically HTML5 is a \'living spec\' but I\'m wondering if it\'s compliant to have trailing spaces inside of a class name. I didn\'t see any reference to this

4条回答
  •  南方客
    南方客 (楼主)
    2021-01-12 22:30

    According to http://validator.w3.org/ under a the following validates successfully.

    Leaving a trailing and leading space may be acceptable, but it's not pretty and some people do not consider it to be best a practice.

提交回复
热议问题