Re:Introduction to HTML and CSS
by baby on Thursday February 06, 2014 @05:39AM
(#7189677)
isn't <br /> part of XHTML and not HTML5?
[ Parent
| on HN ]
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.