This page is Ready to Use

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

all-space-treatment

Summary

Specifies the treatment of all consecutive white space characters (with no exception for line feed characters).

Overview table

Initial value
collapse
Applies to
All elements and generated content.
Inherited
Yes

Media
:

Computed value
As specified (except for initial and inherit).
Animatable
No

CSS Object Model Property
:

Percentages
N/A

Syntax

  • all-space-treatment: collapse
  • all-space-treatment: preserve

Values

collapse
The white space characters are collapsed according to the rules described in white space processing.
preserve
All white space characters are rendered as they are.

Examples

/* preserve */
p.asis {
    all-space-treatment: preserve;
}

Related specifications

CSS3 Text Module
W3C Candidate Recommendation