Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the alternative to <br /> if I want to control the height between lines?

Tags:

html

css

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?

like image 457
DavidW Avatar asked Jun 12 '12 12:06

DavidW


People also ask

How do you adjust the BR height?

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.

How do you go to the next line without the BR in HTML?

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.

What is the height of Br?

<br> is a line break. It doesn't have a height, it just breaks the line. Doesn't replacing mean, removing the element?

What does br /> mean in HTML?

<br>: The Line Break element.


1 Answers

Use differents blocks :

<p>Line1</p> <p>Line2</p> 
like image 153
GuillaumeS Avatar answered Sep 22 '22 09:09

GuillaumeS