16.6 Whitespace: the 'white-space' property

Chapter 16 - Text - 16.6 Whitespace: the 'white-space' property

Go to the relevant page of the specification.

c562-white-sp-000 (ahem, image)
white-space
white-space-001 (ahem)
White-space set to 'normal'
The 'white-space' property set to 'normal' removes extra spacing when more than one space is next to another.
white-space-002 (ahem)
White-space set to 'pre'
The 'white-space' property set to 'pre' does not remove extra spacing when more than one space is next to another.
white-space-003 (ahem)
White-space set to 'nowrap'
The 'white-space' property set to 'nowrap' removes extra spacing when more than one space is next to another. And the text does not wrap when width is constrained.
white-space-004 (ahem)
White-space set to 'pre-wrap'
The 'white-space' property set to 'pre-wrap' does not remove extra spacing when two spaces are next to each other and introduces line breaking opportunities.
white-space-005 (ahem)
White-space set to 'pre-line'
The 'white-space' property set to 'pre-line' does remove extra spacing when two spaces are next to each other and breaks at new lines.
white-space-006 (ahem)
White-space set to 'inherit'
The 'white-space' property set to 'inherit' causes the element to use its parent's white-space value.
white-space-007 (ahem)
white-space
'white-space: normal' and 'white-space: nowrap' should collapse sequences of white space. Regarding wrapping, line breaking opportunities are determined on the text prior to white space collapsing steps.
white-space-008
white-space - pre and newlines in source
Newlines in source must be preserved with 'white-space: pre'
white-space-applies-to-001 (ahem)
White-space application to 'display: inline' element
The 'white-space' property applies to 'display: inline' elements.
white-space-applies-to-002 (ahem)
White-space application to 'display: block' element
The 'white-space' property applies to 'display: block' elements.
white-space-applies-to-003 (ahem)
White-space application to 'display: list-item' element
The 'white-space' property applies to display: list-item elements.
white-space-applies-to-005 (ahem)
White-space application to 'display: inline-block' element
The 'white-space' property applies to 'display: inline-block' elements.
white-space-applies-to-006 (ahem)
White-space application to 'display: table' element
The 'white-space' property applies to 'display: table' elements.
white-space-applies-to-007 (ahem)
White-space application to 'display: inline-table' element
The 'white-space' property applies to 'display: inline-table' elements.
white-space-applies-to-008 (ahem)
White-space application to 'display: table-row-group' element
The 'white-space' property applies to 'display: table-row-group' elements.
white-space-applies-to-009 (ahem)
White-space application to 'display: table-header-group' element
The 'white-space' property applies to 'display: table-header-group' elements.
white-space-applies-to-010 (ahem)
White-space application to 'display: table-footer-group' element
The 'white-space' property applies to 'display: table-footer-group' elements.
white-space-applies-to-011 (ahem)
White-space application to 'display: table-row' element
The 'white-space' property applies to 'display: table-row' elements.
white-space-applies-to-012 (ahem)
White-space application to 'display: table-column-group' element
The 'white-space' property is not applied to 'display: table-column-group' elements.
white-space-applies-to-013 (ahem)
White-space application to 'display: table-column' element
The 'white-space' property is not applied to 'display: table-column' elements.
white-space-applies-to-014 (ahem)
White-space application to 'display: table-cell' element
The 'white-space' property applies to 'display: table-cell' elements.
white-space-applies-to-015 (ahem)
White-space application to 'display: table-caption' element
The 'white-space' property applies to 'display: table-caption' elements.
white-space-bidirectionality-001
White-space and bidirectionality (example from spec)
The white space processing model does not take bidi into account for the first half of the processing model but does for the second half.
white-space-generated-content-before-001
White-space 'pre-line' vs. ':before' assignment
The ':before' assignment and 'white-space: pre-line' assignment behave the same way with respect to white space.
white-space-nowrap-attribute-001
White-space 'nowrap' vs. 'nowrap' attribute
The 'nowrap' attribute and 'white-space: nowrap' assignment behave the same way with respect to white space.
white-space-p-element-001
White-space 'normal' vs. 'p' element
The 'p' element and 'white-space: normal' assignment behave the same way with respect to white space.
white-space-pre-element-001
White-space 'pre' vs. 'pre' element
The 'pre' element and 'white-space: pre' assignment behave the same way with respect to white space.