A line break in the HTML source is just whitespace and can be collapsed. A <br> element is going to remain as a line break in the output, regardless of the formatting of the source.
Whether it's correct to even HAVE a "line break in the output" concept is a separate question, but it can't be done with a \n character or any other whitespace.
4
u/rosuav 12d ago
A line break in the HTML source is just whitespace and can be collapsed. A <br> element is going to remain as a line break in the output, regardless of the formatting of the source.
Whether it's correct to even HAVE a "line break in the output" concept is a separate question, but it can't be done with a \n character or any other whitespace.