B.124. white-space

Experienced HTML designers will be accustomed to the fact that whitespace in HTML source code (sequences spaces, tabs, and line breaks) is collapsed to a single space character in the rendered output, and that line breaks occur only due to normal word wrapping performed by the browser or due to a hard break (<br/>) tag. Non-breaking space characters (&nbsp;), the nowrap attribute in table tags, and the HTML <pre> tag can be used to work around this behavior, when necessary.

The white-space property lets you assign the special properties of these work-arounds to other document elements so that the document code need not reflect the intended formatting.

Inherited: Yes

B.124.1. Value

This property will accept any one of the ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.