White-space

The   property is used in CSS and certain HTML elements. This property is used to to describe how white space inside the element is handled.

Values

 * - Sequences of white space are collapsed. Newline characters in the source are handled as other white space. Breaks lines as necessary to fill line boxes.
 * - Sequences of white space are preserved, lines are only broken at newline characters in the source.
 * - Collapses white space as for, but suppresses line breaks (text wrapping) within text.
 * - Sequences of white space are preserved. Lines are only broken at newline characters in the source and as necessary to fill line boxes.
 * - Sequences of white space are collapsed. Lines are broken at newlines in the source and as necessary to fill line boxes.

The following table summarizes the behavior of the values:

HTML example:

CSS example:

code { white-space:pre; }