white-space property
Description
This property represents trimming and wrapping behavior for text content.
text is not trimmed i.e. text-space-trim is none for all of the values given below.
Syntax
animation-delay : normal | pre | nowrap | pre-wrap | break-spaces | pre-line
Property values
normalDefault
-
does not affect the content.
white-space: normal;
pre
-
preserves the space without wrapping.
white-space: pre;
nowrap
-
Only wraps the text without preserving.
white-space: nowrap;
pre-wrap
-
preserves the formatting of text and wraps the text.
white-space: pre-wrap;
pre-line
-
preserves white-space as well as line breaks and wraps the text.
white-space: pre-line;
Applicable to
It applies to all elements
From web4college, the free CSS digger
#CSS digger
Was this article helpful?
What happens when the content overflows out of the box?
▾