CSS Property Value How to - line-height:16px;








Question

We would like to know how to line-height:16px;.

Answer


<html>
<head>
  <title>Line-height</title>
  <style>
p {<!--from  w w w.j  ava2s.co m-->
  width:200px; 
  padding:5px; margin:10px;
  border-style:solid; border-color:#000000; border-width:2px;}

p.two {
  line-height:16px;}

p.three {
  line-height:28px;}
  
  </style>
</head>

<body>
<p class="one">The text in this paragraph does not have a line-height property. The text in this paragraph does not have a line-height property. The text in this paragraph does not have a line-height property. </p>
<p class="two">The text in this paragraph has a line-height of 16px. The text in this paragraph has a line-height of 16px. The text in this paragraph has a line-height of 16px. The text in this paragraph has a line-height of 16px.</p>
<p class="three">The text in this paragraph has a line-height of 28px. The text in this paragraph has a line-height of 28px. The text in this paragraph has a line-height of 28px. The text in this paragraph has a line-height of 28px. </p>
</body>
</html>

The code above is rendered as follows: