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






p line-height: 3em;

     
<!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' xml:lang='en'>
    <head>
        <title>line-height</title>
<style type='text/css'>
p {
    font: 12px sans-serif;
    border: 1px solid steelblue;
    background: lightsteelblue;
    padding: 5px;
    line-height: 3em;
}
</style>


    </head>
    <body>
        <p>
            Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In et
            nulla. Vestibulum ante ipsum primis in faucibus orci luctus et
            ultrices posuere cubilia Curae; Maecenas sit amet ligula.
            Phasellus purus augue, varius eu, semper id, ornare ac, tellus.
            Etiam bibendum ante et enim. Mauris consectetuer dapibus felis. Cras
            quis lacus. Suspendisse rhoncus felis ut felis. Fusce mollis mi
            in libero. Proin sed ipsum. Vivamus ultrices. In fermentum egestas
            nunc. Mauris nec enim. Donec magna nibh, hendrerit ut, euismod id,
            nonummy eu, mi. Cras porta metus. Cras dictum. Curabitur id nisi
            mattis massa euismod ornare. Sed quam. Aenean scelerisque.
        </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 height: 245px;
10.p line-height: 2.0;
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;