In following example:
Line1
Line2
I\'m using
to force Line2 to go to next line, but as far as I know
Using CSS you can control the line-height
property of any element.
someElement {
line-height:12px;
}
Now you may simply set this for an element, or use it on the entire HTML to provide uniformity across the document. This is safe, cross-browser compatible and easy to use.
Normally, using <br />
is old way of breaking a line.
You should use <p>, <div>
or some block level elements and give them top or bottom margins.
p {
margin-top:5px;
margin-bottom:5px
}
<div>
, best way for me, with CSS margin. Or,<p>
tag.Use differents blocks :
<p>Line1</p>
<p>Line2</p>
Use padding
& / or margin
css attributes.
You can use css line-height
property along with <br/>
tag to control spacing between lines.
<style>
.small
{
line-height:100px;
}
</style>
<p class="small">
This is a paragraph with a smaller line-height.<br />
This is a paragraph with a smaller line-height.<br />
This is a paragraph with a smaller line-height.<br />
This is a paragraph with a smaller line-height.<br />
</p>