+ 1

Why <br/> is used here if we can simply write it as <br>?

30th Dec 2017, 7:10 AM
Ashish Soren
Ashish Soren - avatar
10 Answers
+ 5
@martin, many thx for the correction , looks like w3shcools also updated that, I read there itself few months back that <br /> are still w3c recommendations, good to know that <br> , are the recommendations now, I ll have to correct my practice 👍
30th Dec 2017, 10:34 AM
Morpheus
Morpheus - avatar
+ 3
Some coders like me are addicted to the "/" option.It makes it easier to identify single tags
30th Dec 2017, 7:14 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 3
@martin , exactly , I ll just add, that's y it is suggested to use the / for self closing tags, coz it can easily crash old XML application , and must be followed in your production code. but it's ok to skip / , while ur testing with tolerant browsers, but y not make it a good habit, after all it's the w3c recommended to use self closing tags like<br />
30th Dec 2017, 7:51 AM
Morpheus
Morpheus - avatar
+ 3
@Martin, just curious btw any ideas where does the experts come from in the legal panels of software patent law suits
30th Dec 2017, 12:49 PM
Morpheus
Morpheus - avatar
+ 2
You can write which one you think is right for you. In <br> or <br/> , There is no difference. / is optional. It is your choice to add it or not
30th Dec 2017, 7:13 AM
Akash Pal
Akash Pal - avatar