4 ms·
nice touch with the <br> <br/> either is fine
by grahamel 13y ago
nice touch with the <br> <br/> either is fine
- baby 13y agoisn't <br /> part of XHTML and not HTML5?
- mjhea0 13y agotechnically, yes - but it can still be used. either is fine.
- grahamel 13y agoActually 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.
- shawnz 13y agoIt'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.
- c23gooey 13y agoi think this makes it confusing for the casual, first time learner.