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
Sure, it's valid. A useful example would be if you wanted to visually add a little space after a line-break, without ending the paragraph. Or perhaps apply a background image. All sorts of styling options.
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.
Yes, you can add a class
attribute to a <br>
element. id
as well if you want.
Yes.
See the specification.
The class
attribute applies to "HTML Elements" (which includes br
elements).