What is Line Height in CSS?
- Line Height property defines amount of height in which text content is written in HTML.
Properties of Line Height:
Normal:
This is default Height line, generally around 100% to 120%.
e.g.: Default Height line in word document.
Number:
A number that will be multiplied with the current font size to set the line height.
Length:
Fixed Length in px, pt etc.
Percentage:
% of current font size.
Initial:
Set to default value.
Inherit:
Inherit from Parent.
Please find the example below for more detail,
HTML
Length:
Fixed Length in px, pt etc.
Percentage:
% of current font size.
Initial:
Set to default value.
Inherit:
Inherit from Parent.
Please find the example below for more detail,
HTML
p.normal { line-height: normal;}
p.percentage { line-height: 150%;}
p.length { line-height: 50px;
}
normal line height.
normal line height.
normal line height.
percentage line height.
percentage line height.
percentage line height.
length line height.
length line height.
length line height.
No comments:
Post a Comment