+ 2
Empty tags
Is it <br> , <br /> or <br/> ? I don't get which one works
7 Respostas
+ 3
Most browser won't have problem if you type <br> in html, but if you work with some framework/library(where you type html inside javascript), compiler may have problem converting code, I always use <br /> because of it.
There are no diference between <br /> and <br/>, this space means nothing to computer, but I like space it make code cleaner.
Same is for any other self closening tag, like <hr /> <img />, so all of them are valid, and you can choose one you like the most.
But my suggestion is to close tag with /> at end, because sometimes you may need to close it, and it will be hard to do if you have 1000 tags to manually close.
More about this topic:
https://www.tutorialstonight.com/self-closing-tags-in-html
+ 3
Use which ever you want, they are all the same <br> can be used with or without closing it with / it's a single tag with no closing tag like other html tags
+ 2
<br\> is the most use and it make your code clean
0
Jay Matthews thanks
0
PanicS thanks
0
<br> tag is the line break tag
0
<br> tag