p white-space: pre; : p layout « Tags « HTML / CSS

Home
HTML / CSS
1.CSS
2.CSS Controls
3.Form
4.IE Firefox
5.Layout
6.Marquee Attributes
7.Meta Tags
8.Microsoft Attributes
9.Object
10.Reference
11.Style Basics
12.Tags
13.Templates
14.XML
HTML / CSS » Tags » p layout 




p white-space: pre;
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title></title>
        <style type='text/css'>
            {
                font-family: monospace;
                white-space: pre;
            }
        </style>
    </head>
    <body>
        <p>
      this is a test
      this is a test
      this is a test
      this is a test
      this is a test
      this is a test
      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.p line-height: 2.0;
12.Paragraph with different line-height
13.This paragraph is floated left
14.p float:left;
15.p float:right;
16.p float: left;
17.P display: block;
18.p display:none;
19.p overflow: visible;
20.p overflow: auto;
21.p overflow: scroll;
22.p overflow: hidden;
23.p white-space: nowrap;
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.