CSS white-space Property


The CSS white space property is used to specify how to display the content within an element. It is used to handle the white spaces inside an element.

The white-space Property in CSS is used to control the text wrapping and white-spacing.there are several types of values in this property to use.

Property Values:

  • This is the default value of this property. When white-space property of CSS is set to normal every sequence of two or more white-spaces will appear as a single white-space. The content in the element will wrap wherever necessary.

CSS Syntax

white-space: normal|nowrap|pre|pre-line|pre-wrap|initial|inherit;

Example -