Re:Introduction to HTML and CSS
by grahamel on Thursday February 06, 2014 @05:01AM
(#7189573)
nice touch with the <br> <br/> either is fine
[ Parent
| on HN ]
isn't <br /> part of XHTML and not HTML5?
Actually looking into it seems that it is, and that example is wrong.
The spec examples only use <br> and call it a void element (one which can't have any content) but states only foreign elements can be self closing.
It's true that void elements can't be self-closing in HTML, but the slash is still allowed. If you scroll down to 8.1.2.1 #6, you will see that the slash is just ignored if present on void elements.
technically, yes - but it can still be used. either is fine.