Which one is use for html5 <br> or <br />? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9

Which one is use for html5 <br> or <br />?

10th Sep 2018, 9:01 PM
shiwangee pathak
shiwangee pathak - avatar
10 Answers
+ 9
shiwangee pathak, Both are possible but the /> is correctly formatted in HTML5. Correct formatted break-line tag. <br /> An html tag without closing tag you close with: /> E.g. <img src="" /> <input type="" /> <hr /> <br />
10th Sep 2018, 9:25 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 3
thank u
10th Sep 2018, 9:23 PM
shiwangee pathak
shiwangee pathak - avatar
+ 3
thank u..
10th Sep 2018, 9:26 PM
shiwangee pathak
shiwangee pathak - avatar
+ 3
both can be used, the' /' is not a must for inline elements. so both are actually the same.
12th Sep 2018, 8:30 AM
Nathan 🇰🇪
Nathan 🇰🇪 - avatar
+ 2
You can use the two
10th Sep 2018, 11:52 PM
Black Wizard
Black Wizard - avatar
+ 2
<br /> will line break a line(a new line) to your HTML document
11th Sep 2018, 2:31 AM
Potato Hacker
Potato Hacker - avatar
+ 1
🌴Vincent Berger🌴 , it's only fox XHTML, HTML5 defines "/" as optional for void elements. Reference: http://w3c.github.io/html/syntax.html#start-tags
12th Sep 2018, 8:40 PM
Roman K
+ 1
<br>
23rd Sep 2018, 7:34 PM
Matusala Abrha
Matusala Abrha - avatar
0
both. <br/> is the xml way to write it but works the same as <br>
14th Sep 2018, 8:49 AM
Zennylen Camba
0
<br/> is used in html5
14th Sep 2018, 9:20 AM
Rishi Raj