- Description
Sets how white space, such as carrage returns and extra space is rendered by the browser. Normally in HTML white space is ignored. Setting the white-space attribute to pre is like wrapping a pre tag around it. Browsers ignor line breaks when white-space is set to nowrap and only break the line when a line break tag <br /> is set in the HTML
See also:
- Live Example
- Play with the code in the textarea below.
- Values
- normal | pre | nowrap | pre-wrap | pre-line | inherit
- Default value
- normal
- Introduced in CSS version
- 1
- Applies to elements
- All
- Inherited
- Yes
- Browser Support
Browsers IE Firefox Safari Opera Chrome Versions full 8, part 5 full 3, part 1 3.1 6 0.4
Belongs to:
See the full list CSS properties and browser support: CSS Properties