In following example:
Line1 <br /> Line2
I'm using <br />
to force Line2 to go to next line, but as far as I know there is no cross browser friendly way of setting the height of br. What is an alternative method I could use?
You can't change the height of <br> tag as its not an HTML element, it is just an instruction which enforces a line break. br does not take up any space in the page. There is a way by which you can increase line break between lines, is by putting multiple br tags.
You can use the <pre> tag to keep the line breaks. The default style for pre tags is monospaced font, but that can be overriden. You can achieve the same effect without any extra default formatting using the white-space: pre CSS property.
<br> is a line break. It doesn't have a height, it just breaks the line. Doesn't replacing mean, removing the element?
<br>: The Line Break element.
Use differents blocks :
<p>Line1</p> <p>Line2</p>
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