Line-height settings : line height « CSS « HTML / CSS






Line-height settings

  

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>Line-height</title>
<style type='text/css'>
p {
  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. </p>
<p class="two">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>

   
    
  








Related examples in the same category

1.'line-height' Example
2.line-height: 1.5
3.line-height: 1.4em
4.line-height: 75%
5.line-height: 1.5;
6.line-height: 1.5em;
7.line-height: 75%;
8.line height:3em
9.Setting line heights
10.line-height:normal;line-height:18px;line-height:1.5em;line-height:1.9ex;
11.line-height:1.5em;
12.Interlinear space
13.Examples of font-size and line-height
14.Set line height to 1em
15.Set line height to 1.5
16.line-height: 150%; assigns 150% of the font-size to line-height.
17.Padding sets apart text to emphasize it and line-height
18.Proportional line heights
19.Different line height with various measurements