HTML and CSS Reference
In-Depth Information
Conceivably, you could wreak all sorts of havoc by switching element
classifications, forcing paragraphs to be displayed as list items and con-
verting hyperlinks to block elements. In practice, this is just puerile
monkey business, and we don't recommend that you change element
classifications without a very good reason to do so.
All the popular browsers support this property, but Internet Explorer
supports only the
block
and
none
values.
8.4.10.2. The white-space property
The
white-space
property defines how the styles-conscious browser
treats whitespace (tabs, spaces, and carriage returns) within a block
tag. The keyword value
normal
the defaultcollapses whitespace so that
one or more spaces, tabs, and carriage returns are treated as a single
space between words. The value
pre
emulates the
<pre>
tag, in that the
browser retains and displays all spaces, tabs, and carriage returns. Fin-
ally, the
nowrap
value tells the browser to ignore carriage returns and not
insert automatic line breaks; all line breaking must be done with explicit
<br>
tags.
Like the
display
property, the
white-space
property is rarely used for
good purposes. Don't change how elements handle whitespace without
a compelling reason for doing so.
Internet Explorer only supports the
nowrap
value, and the other popular
browsers support both
pre
and
nowrap
values for the
white-space
prop-
erty.
8.4.11. Generated Content Properties
The idea of generated content is not new to HTML. Even the earliest
browsers automatically appended appropriate bullets or numbers to en-
hance the readability of your unordered and ordered list items. Such
features are hardly enough, though, and authors have wished for better
content-generation tools in HTML. CSS2 finally comes through, giving