CSS alignment line-height property
CSS Alignment line-height Property
Description
The line-height property modifies the height of an inline box that consists of a line of text.
Possible Values
- normal – Instructs the browser to set the element’s line height to a “reasonable” distance.
-
number – The actual height of a line within an element is this value multiplied by the element’s font size.
-
length – The height of the lines within the element is the given value.
-
percentage – The height of the lines within the element is calculated as a percentage of the element’s font size.
Applies to
All HTML elements.
DOM syntax
object.style.lineHeight = "15px;"
Example
Here are examples:
<html>
<head>
</head>
<body>
<p style = "line-height:180%">
This text is having bigger line height. Line 1
This text is having a larger line height. Line 2
</p>
</body>
</html>
This will produce the following −
eaa_mobile” id=”eaa_after_nth_p_1″>