O'Reilly logo

Cascading Style Sheets: The Definitive Guide by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

white-space — IE4 N/N | IE5 N/Y | NN4 P/P | Op3 N/-

Synopsis

This property defines how whitespace within the element is treated. normal acts like traditional web browsers, in that it reduces any sequence of whitespace to a single space. pre causes whitespace to be treated as it is in the HTML element PRE, with whitespace and returns preserved. nowrap prevents an element from line breaking.

Example

TD {white-space: nowrap;}
TT {white-space: pre;}

Values

normal | pre | nowrap

Default

normal

Inherited

yes

Applies to

block

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required