+ 2

<br> or <br /> ?

what is the difference btw those? Is the spaces needed after br to put slash(br /) and where to use <br> and where to use <br />?

5th Jul 2017, 11:54 AM
Girish Tulabandu
Girish Tulabandu - avatar
4 odpowiedzi
+ 4
<br/> is the XHtml form, and was supported by Html4 for compatibility with XHtml purpose <br> is the only actual (Html5 specifications) valid form (as XHtml was now abandonned, Html5 doesnt more support it) Anyway, all forms are working most of the time in browsers, because Html specifications tell that browsers are expected to keep Html permissive, and try to render better as possible whole content of a web document... So they are all implemented a bunch of auto-corrections in case of more or less invalid Html (so </br> or <br/> is easily explicitly understandable and corrected as <br> -- but in some cases, you cannot predict if all browsers will correct invalid Html in same ways). However, search engines are not mandatory to accept malformed/invalid web documents, and will downrate your site/page in such case :P https://www.sololearn.com/Discuss/507808/?ref=app
5th Jul 2017, 12:21 PM
visph
visph - avatar
+ 2
@sami thanq
5th Jul 2017, 2:23 PM
Girish Tulabandu
Girish Tulabandu - avatar
+ 1
no difference..they are same.. these are the empty tags.. they don't need to close anymore in html5
5th Jul 2017, 12:00 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
thanq @visph I got a clear understand
5th Jul 2017, 2:24 PM
Girish Tulabandu
Girish Tulabandu - avatar