line-height: 1.5; : line height « CSS « HTML / CSS






line-height: 1.5;

   
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type='text/css'>
td {
  width: 200px;
  font: 12pt arial;
}

td.number {
  font-size: 12pt;
  line-height: 1.5;
}

td.length {
  font-size: 12pt;
  line-height: 1.5em;
}

td.percentage {
  font-size: 12pt;
  line-height: 75%;
}
</style>


</head>

<body>
<table>
  <tr>
    <td class="number">The text here uses a  number, in this case 1.5, to specify the line-height. The text here uses a  number, in this case 1.5, to specify the line-height.</td>
    <td class="length">The text here uses a length of 1.5em to specify the line-height. The text here uses a length of 1.5em to specify the line-height.</td>
    <td class="percentage">The text here uses a percentage, in this case 75%, to specify the line-height. The text here uses a percentage, in this case 75%,, to specify the line-height.</td>
  </tr>
</table>
</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.5em;
6.line-height: 75%;
7.line height:3em
8.Setting line heights
9.Line-height settings
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