Web4College

white-space property

src

Description

This property represents trimming and wrapping behavior for text content.

text is not trimmed i.e. text-space-trim is none for all of the values given below.

Syntax

animation-delay : normal | pre | nowrap | pre-wrap | break-spaces | pre-line

Property values

normalDefault

does not affect the content.

white-space: normal;
Try it

pre

preserves the space without wrapping.

white-space: pre;
Try it

nowrap

Only wraps the text without preserving.

white-space: nowrap;
Try it

pre-wrap

preserves the formatting of text and wraps the text.

white-space: pre-wrap;
Try it

pre-line

preserves white-space as well as line breaks and wraps the text.

white-space: pre-line;
Try it

Applicable to

It applies to all elements