Arrow

CSS Line Height

AuthorHariom Prajapati

Pubish Date28 Sep 2022

categoryCSS

It is use to specify the height of vertical space between lines of text.

 

Syntax -

line-height: value;

 

values

normal

⦁ It is normal line height.

⦁ it is default 

number

Any number that need to set line height according to multiplied with the current font-size.

 

length

Line height in px, pt, cm, etc.

%

Line height in percent of the current font size.

 

For example -

<!DOCTYPE html>
<html>

<head>
  <title>CSS Word Spacing</title>

  <style>
    .normal {
      line-height: normal;
    }

    .line_height {
      line-height: 90px;
    }
  </style>
</head>

<body>
  <h1> Normal Value (default) </h1>
  <h3 class="normal">Teknowize is a online platform where you can learn programming. Teknowize is a online platform where you can learn programming.</h3>
  <h1> Length Value</h1>
  <h3 class="line_height">Teknowize is a online platform where you can learn programming.Teknowize is a online platform where you can learn programming.</h3>
</body>

</html>

 

Output

CSS Line Height