White Space Property Combinations

This page lists all 60 combinations of the properties 'linefeed-treatment', 'all-space-treatment', and 'white-space-treatment' as defined by the May 2003 CSS3 Text Candidate Recommendation.

Key for Sample Text

A sample input is given in the last column, to show the effect these properties would have. It uses the following symbols in place of whitespace:

-
space (U+0020)
/
linefeed (U+000A)
|
zero width space (U+200B)
A
space, zwsp, or nothing as automatically determined by context
all-space-treatment linefeed-treatment white-space-treatment text--text--/-/---text/--text
preserve auto ignore texttextAAtextAtext
preserve auto preserve text--text--A-A---textA--text
preserve auto ignore-if-before-linefeed text--textAA---textA--text
preserve auto ignoref-if-after-linefeed text--text--AAtextAtext
preserve auto ignore-if-surrounding-linefeed text--textAAtextAtext
preserve ignore ignore texttexttexttext
preserve ignore preserve text--text------text--text
preserve ignore ignore-if-before-linefeed text--text---text--text
preserve ignore ignore-if-after-linefeed text--text--texttext
preserve ignore ignore-if-surrounding-linefeed text--texttexttext
preserve preserve ignore texttext/text/text
preserve preserve preserve text--text--/-/---text/--text
preserve preserve ignore-if-before-linefeed text--text//---text/--text
preserve preserve ignore-if-after-linefeed text--text--//text/text
preserve preserve ignore-if-surrounding-linefeed text--text//text/text
preserve treat-as-space ignore texttext--text-text
preserve treat-as-space preserve text--text--------text---text
preserve treat-as-space ignore-if-before-linefeed text--text-----text---text
preserve treat-as-space ignore-if-after-linefeed text--text----text-text
preserve treat-as-space ignore-if-surround-linefeed text--text--text-text
preserve treat-as-zero-width-space ignore texttext||text|text
preserve treat-as-zero-width-space preserve text--text--|-|---text|--text
preserve treat-as-zero-width-space ignore-if-before-linefeed text--text||---text|--text
preserve treat-as-zero-width-space ignore-if-after-linefeed text--text--||text|text
preserve treat-as-zero-width-space ignore-if-around-linefeed text--text||text|text
preserve ignore-if-after-linefeed ignore texttext/text/text
preserve ignore-if-after-linefeed preserve text--text--/-/---text/--text
preserve ignore-if-after-linefeed ignore-if-before-linefeed text--text/---text/--text
preserve ignore-if-after-linefeed ignore-if-after-linefeed text--text--/text/text
preserve ignore-if-after-linefeed ignore-if-around-linefeed text--text/text/text
collapse auto ignore texttextAtextAtext
collapse auto preserve text-text-|-|-text|-text or text-text-text-text
collapse auto ignore-if-before-linefeed text-text||-text|-text or text-text-text-text
collapse auto ignore-if-after-linefeed text-text-||text|text or text-text-text-text
collapse auto ignore-if-around-linefeed text-text||text|text or text-text-text-text
collapse ignore ignore texttexttexttext
collapse ignore preserve text-text-text-text
collapse ignore ignore-if-before-linefeed text-text-text-text
collapse ignore ignore-if-after-linefeed text-text-texttext
collapse ignore ignore-if-around-linefeed text-texttexttext
collapse preserve ignore texttext//text/text
collapse preserve preserve text-text-/-/-text/-text
collapse preserve ignore-if-before-linefeed text-text//-text/-text
collapse preserve ignore-if-after-linefeed text-text-//text/text
collapse preserve ignore-if-around-linefeed text-text//text/text
collapse treat-as-space ignore texttext-text-text
collapse treat-as-space preserve text-text-text-text
collapse treat-as-space ignore-if-before-linefeed text-text-text-text
collapse treat-as-space ignore-if-after-linefeed text-text-text-text
collapse treat-as-space ignore-if-around-linefeed text-text-text-text
collapse treat-as-zero-width-space ignore texttext||text|text
collapse treat-as-zero-width-space preserve text-text-|-|-text|-text
collapse treat-as-zero-width-space ignore-if-before-linefeed text-text||-text|-text
collapse treat-as-zero-width-space ignore-if-after-linefeed text-text-||text|text
collapse treat-as-zero-width-space ignore-if-around-linefeed text-text||text|text
collapse ignore-if-after-linefeed ignore texttext/text/text
collapse ignore-if-after-linefeed preserve text-text-/-/-text/-text
collapse ignore-if-after-linefeed ignore-if-before-linefeed text-text/-text/-text
collapse ignore-if-after-linefeed ignore-if-after-linefeed text-text-/text/text
collapse ignore-if-after-linefeed ignore-if-around-linefeed text-text/text/text