Version: Level 1
Compability: IE5.5 N4+
-
Syntax:
- white-space : normal | pre | nowrap
- nowrap
- The nowrap value allows a text to continue on the same line until the end of the text or until an HTML tag <br> is encountered. The <br> tag causes the text to wrap down to the next line.
- pre
- The pre value behaves like the HTML tag <pre>.
- normal
- The normal value is the default.
The white-space property determines the use of white space (blank space) inside an element. This property is inherited.
Examples
Code:
p { white-space: normal; }
p { white-space: pre; }
p { white-space: nowrap; }
Language(s):
CSS2
Code:
<p style="white-space: pre;">How now purple cow?</p>Output:
How now purple cow?
Language(s):
CSS2
See Also: