0
For loop
In the example given by Solo learn, they used "document.write(i + "<br/>)", however when I tried to use (i + "<br>") I've got the same answer. If those two are correct, why they use backslash?
2 Respostas
+ 5
Moshi
<br> is for HTML5
<br/> and <br /> are for XHTML
however the better way is written with and back slash, <br /> is always preferable
https://www.w3.org/TR/xhtml1/#C_2
So both are alternative ways to write tag and used for same purpose.
0
Thank you!