white-space
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The white-space
SVG attribute specifies how white space within text should be handled. This includes whether and how white space inside the element is collapsed and whether lines may wrap at unforced soft wrap opportunities.
Note:
As a presentation attribute, white-space
also has a CSS property counterpart: white-space
. When both are specified, the CSS property takes priority.
Usage notes
Value | normal | pre | nowrap | pre-wrap | break-space | pre-line |
---|---|
Default value | normal |
Animatable | No |
For a description of the values, please refer to the CSS white-space
property.
Specifications
Specification |
---|
CSS Text Module Level 4> # white-space-property> |
Scalable Vector Graphics (SVG) 2> # TextWhiteSpace> |
Browser compatibility
Loading…
See also
xml:space
attribute- CSS
white-space
property