CSS white-space

The CSS white-space property is used to control how white space inside an element is handled. It can be used to control whether to preserve or collapse white space, and how line breaks are handled.

There are several possible values for the white-space property:

Examples

Result:
This is an example of normal white space.
Result:
This is an example of nowrap white space.
Result:
This is an example of pre white space.
Result:
This is an example of pre-wrap white space.
Result:
This is an example of pre-line white space.