revision:
- specifies how white-space inside an element is handled.
Property values:
normal : sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default
nowrap : sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a
tag is encountered
pre : whitespace is preserved by the browser. Text will only wrap on line breaks. Acts like the <pre> tag in HTML
pre-line : sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary, and on line breaks
pre-wrap : whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks
initial : sets this property to its default value.
inherit : inherits this property from its parent element.
example: white-space property
This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
<div> <h4>white-space: nowrap:</h4> <p class="P-A"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </p> <h4>white-space: normal:</h4> <p class="P-B"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </p> <h4>white-space: pre:</h4> <p class="P-C"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </p> </div> <style> p.P-A {white-space: nowrap;} p.P-B {white-space: normal;} p.P-C {white-space: pre;} </style>