CSS Property Value How to - line-height: 200%;








Question

We would like to know how to line-height: 200%;.

Answer


<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of CSS line height</title>
<style type="text/css">
p.one {<!-- ww  w .  ja v a2  s. c o m-->
  line-height: 1.2;
  border: 1px solid #00ff00;
}

p.two {
  line-height: 200%;
  border: 1px solid #ff0000;
}
</style>
</head>
<body>
  <h1>Change the values to see how it works.</h1>
  <p class="one">
    The
    <code>line-height</code>
    property sets the height between lines of text.<br> The line
    height of this paragraph is specified using number.
  </p>
  <p class="two">
    The
    <code>line-height</code>
    property sets the height between lines of text.<br> The line
    height of this paragraph is specified using percentage.
  </p>
</body>
</html>

The code above is rendered as follows: