- 4
Why is br tag used in html
From akul
6 Respuestas
+ 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....
+ 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
0
<br /> is not a broken tag 😅.
is for making a new line.
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.
- 1
It is used to leave a line
- 4
To leave a line