p line-height: 2.0; : p layout « Tags « HTML / CSS






p line-height: 2.0;

    
  
<!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" lang="en-US">
  <head>
    <title>Chapter 2</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style>
h1 {
  font: 1.6em Verdana, Geneva, Arial, Helvetica, sans-serif;
  padding: 0.2em;
}
p {
  font: 1em Verdana, Geneva, Arial, Helvetica, sans-serif;
  line-height: 2.0;
}
</style>    
  </head>
  <body>
    <h1>Heading</h1>
    <p>This is a test.</p>
  </body>
</html>

   
    
    
    
  








Related examples in the same category

1.Set width for a paragraph
2.p min-width: 500px;
3.p width:40em;
4.p width: 245px;
5.Set width and height for paragraph
6.p line-height: 1em;
7.Set line height of a Paragraph in content section
8.p max-height: 50px;
9.p line-height: 3em;
10.p height: 245px;
11.Paragraph with different line-height
12.This paragraph is floated left
13.p float:left;
14.p float:right;
15.p float: left;
16.P display: block;
17.p display:none;
18.p overflow: visible;
19.p overflow: auto;
20.p overflow: scroll;
21.p overflow: hidden;
22.p white-space: nowrap;
23.p white-space: pre;