Why is br tag used in html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 4

Why is br tag used in html

From akul

13th Jun 2017, 8:07 AM
rinku
6 Answers
+ 3
If a tag is cracked you cannot use it without repair it :P The <br> element is eventually called the "break" tag, as it stand for BReak line: it doesn't exactly "leave a line" as you attempt to answer yourself, but break the current line (so it leave a line only if placed on a new starting line ^^) Anyway, the question isn't more relevant than the answer, and such thread are unnecessary and even more act as spam, hidding relevant stuff of the Q&A Discussions section....
13th Jun 2017, 8:51 AM
visph
visph - avatar
+ 2
@Calvin: Your <br /> is effectivelly broken, even if auto-repaired by browsers, as the only valid way to write it in Html5 is <br> ;P
13th Jun 2017, 10:43 AM
visph
visph - avatar
0
<br /> is not a broken tag 😅. is for making a new line.
13th Jun 2017, 9:24 AM
Calviղ
Calviղ - avatar
0
@visph Well, <br> and <br /> are both accepted in HTML5. <br /> has a slight advantage when use in XML and PHP and some frameworks. Personally, I feel more logical to use <br /> 😅 Anyway <br> is fine and Google use it. 😉 ReactJS uses <br \>, for my practise, I would follow ReactJS format.
13th Jun 2017, 11:38 AM
Calviղ
Calviղ - avatar
- 1
It is used to leave a line
14th Jun 2017, 10:24 AM
rinku
- 4
To leave a line
13th Jun 2017, 8:07 AM
rinku