CSS Line Height: This property in CSS can be used to describe the line box’s minimal height inside the element. It sets-up the distinction among two lines in our content.

It depicts the amount of space below and above the inline elements. It also allows us to set-up the line height, which is independent of various font sizes.

Values of Line-height

Following are a few values properties which can be applied in Line Height attribute:

normal: Normal value is used as a default value. It portrays the line-height normally.

number: It depicts a number which will be multiplied with a font size, which is currently in use, to set-up line-height.

length: Length value is applied to set-up line-height with pt, cm, px, etc.

%: It can be specified by the use of the current font’s percent for setting line-height.

initial: It is used to sets-up this attribute to the default value.

inherit: It acquires this attribute from the parent element.

Example:

Output:

CSS Line Height

Example:

In the following example, line height is set-up with a number along with different <div> tags:

Output:

CSS Line Height

Pin It on Pinterest

Share This