property
white-space-collapse — CSS reference
Separates whitespace processing from wrapping. Initial collapse and inherited. Break-spaces preserves spaces and allows breaks after each preserved space. Draft values may not be implemented.
Formal Syntax & Structure
css syntaxcss
collapse | preserve | preserve-breaks | preserve-spaces | break-spaces | discardWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS text lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}
#a{white-space-collapse:break-spaces}</style><body><p id="a">Design readable interfaces with CSS.</p><p lang="fa" dir="rtl">متن فارسی برای آزمایش چیدمان</p></body></html>