In html we d better use which one <br> or <br/>? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

In html we d better use which one <br> or <br/>?

7th Oct 2019, 10:47 AM
野ē”Ÿč±¹ēŒ«
野ē”Ÿč±¹ēŒ« - avatar
2 Answers
+ 6
If you would want to learn react later. You should use <br />, according to react.js rule every tags must has closing tag including self-closing tag.
7th Oct 2019, 2:00 PM
CalviÕ²
CalviÕ² - avatar
+ 1
Both, but Iā€™d prefer to use <br> for a few reasons: - Itā€™s more ā€œelegantā€ (my opinion, of course), - itā€™s one less character to be typed, - and most of the best IDEā€™s out there already does the <br> autocomplete instead of <br/>
7th Oct 2019, 1:46 PM
Marcos Rodrigo Sousa
Marcos Rodrigo Sousa - avatar