CSS - line-height Property

> (World Wide) Web - (W3|WWW) > CSS - Cascading Style Sheets - Markup Language (HTML|XML) Skin

1 - About

On block level elements, the line-height property specifies the space between the text lines.

3 - Javascript


4 - Example

4.1 - The effect of line-height of the box height

See CSS - Height of a box

p {
    border: 1px solid black;
    font-size: 1.5rem;
    line-height: normal;
    text-align: center;
p.small {
    line-height: 1rem;
p.big {
    line-height: 3rem;
p.null {
    line-height: 0;
<div style="width: 300px">
	<p class="small">
	A small line height will make the box height smaller.
	A normal line height will make the box height look normal
	<p class="big">
	A big line height will make the box height bigger
        <p class="null">
	null line height = 0 height


5 - Documentation / Reference

web/css/line-height.txt ยท Last modified: 2019/02/09 11:40 by gerardnico