The best CSS white-space property Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,related articles,
Provisions of paragraph text without line breaks:
white-space attribute specifies how to handle blank element inside.
Defaults: | normal |
---|---|
inherit: | yes |
version: | CSS1 |
JavaScript syntax: | object .style.whiteSpace = "pre" |
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
white-space | 1.0 | 5.5 | 3.5 | 3.0 | 9.5 |
value | description |
---|---|
normal | default. Blank will be ignored by the browser. |
pre | Blank will be retained browser. Its behavior is similar to the HTML <pre> tag. |
nowrap | The text does not wrap text will continue on the same line until it encounters <br> tags so far. |
pre-wrap | Leave blank character sequence, but normally newline. |
pre-line | The combined whitespace sequences, but retain the line breaks. |
inherit | Provisions should inherit the white-space property value from the parent element. |
CSS tutorial: CSS the Text