Example
A simple white-space property example:
Laboratory
description & Usage
To manage white and empty space in an element, we use the white-space property.
Browser compatibility and Support
# |
Chrome |
Edge |
Firefox |
Safari |
Opera |
white-space |
|
|
|
|
|
Values
Values |
Description |
normal
|
default
|
nowrap
|
The text continues on one line until it encounters the <br> tag and continues on the next line.
|
pre
|
Like the <pre> tag in html, the text closes only at line breaks.
|
pre-wrap
|
It causes the empty space to be managed by the browser and the text ends on the next line in the appropriate place.
|
initial
|
Adds this value to its default property.
|
inherit
|
It inherits this value from its parent tag.
|