+ 1
Why <br/> is used here if we can simply write it as <br>?
10 Antworten
+ 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 👍
+ 3
Some coders like me are addicted to the "/" option.It makes it easier to identify single tags
+ 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 />
+ 3
@Martin, just curious
btw any ideas where does the experts come from in the legal panels of software patent law suits
+ 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