CSS white-space property

Usage

Specfies how white (empty) space is handled within an element.

Values

  • normal - default, the browser ignores white space
  • pre - white space is preserved as it is in the code
  • nowrap - the text will not wrap until a line break is explicitly used

Example

Code:

p {
  white-space: pre;
}