We can control the space between
lines of text
using the line-height
property.
The value can be given as a unitless number like
1.5, 2 etc or in px
, em
, %
or even the keyword normal
.
The number value or percentage is used as a multiplier.
line-height: 1.5
means the space
between the lines will be 1.5 times
the font size of the element.
The value of line-height: normal
is set based on the browser's default value.
Unitless values are used more often to set line-height
as using relative units like em
, rem
can cause confusions due to inheritance from other elements.