I know that BR is used to create line-breaks. I'm just wondering if it also creates space between lines? Please consider these example:
<p>
Hello <br/> Stackoverflow <br/><br/><br/> !
</p>
The output looks like:
Hello
Stackoverflow
!
By putting more and more BR I found distance between lines increase. Is it because of <br>
? But when I try to control <br>
height in CSS, it doesn't follow, it seems like it has no height at all, just a line-break. If <br>
is not the cause of the space between line, then which is which and how to control it in CSS? Also, I usually use <br>
to create large distance between lines, I do that to replace \n\r
or the like when the data is from the database, is that okay?
The <br />
tag is for line breaks. You can use the CSS line-height property to control distance between lines, if you want to look at it that way.
for large distances between lines, is better to use <p>
tags for every line, in which you can control the height.
http://jsfiddle.net/efortis/f6ju2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With