top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which property is used to control the flow and formatting of text in CSS?

0 votes
592 views
Which property is used to control the flow and formatting of text in CSS?
posted Jun 22, 2017 by Sumanta Hazra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

white-space

white-space property is used to control the flow and formatting of text in CSS.

Syntax

The white-space property is specified as a single keyword chosen from the list of values below.

Values

normal
Sequences of whitespace are collapsed. Newline characters in the source are handled as other whitespace. Breaks lines as necessary to fill line boxes.
nowrap
Collapses whitespace as for normal, but suppresses line breaks (text wrapping) within text.
pre
Sequences of whitespace are preserved. Lines are only broken at newline characters in the source and at <br> elements.
pre-wrap
Sequences of whitespace are preserved. Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.
pre-line
Sequences of whitespace are collapsed. Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.

Example

/* Keyword values */
white-space: normal;
white-space: nowrap;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;

/* Global values */
white-space: inherit;
white-space: initial;
white-space: unset;
answer Jun 26, 2017 by Divya Nayak
...