Apply a class to a br tag?

后端 未结 10 1403
感情败类
感情败类 2021-02-06 21:10

Is the following valid HTML?


As an HTML element I can\'t see why it wouldn\'t be, but I don\'t think I\'ve eve

10条回答
  •  隐瞒了意图╮
    2021-02-06 21:59

    a br tag doesn't produce a CSS box and hence little can be done with it.

    Only practical case is clear. i believe drupal used it at some time. interestingly CSS 1 spec. refrained from doing anything to br. http://www.w3.org/TR/REC-CSS1/#br-elements. no doubt applying some css on it doesn't invalidate the code but will cause little effect.

    this https://stackoverflow.com/a/899359/1043824 is a good discussion on the topic.

提交回复
热议问题