i

Learn HTML and CSS in 10 Days

CSS White Space

This property is utilized in handling white spaces present inside an element.

Let’s have a look at some of its values

  • Normal – It is the pre-defined value where the text gets wrapped when necessary.

  • Nowrap – With this value, the text is not going to get wrapped to the next line.

  • Pre – Whitespace gets preserved by the browser.

  • Pre-line – A sequence of white space will be collapsing into a single white space.

  • Pre-wrap – Text is wrapped whenever necessary and on the break of a line.

  • Initial – The property is set to its default value by this.

  • Inherit – It takes in all the property from its parents.