HTML and CSS Reference
In-Depth Information
The following rule creates a 3-pixel distance between letters and a 5-pixel distance
between words inside a paragraph:
p {
letter-spacing: 3px;
word-spacing: 5px;
}
white-space
The white-space property changes the way whitespace characters inside of a block
element are handled.
white-space (block) : inherit | normal | nowrap | pre | pre-wrap | pre-line
Multiple whitespace characters are normally collapsed into a single character in
HTML, and text is wrapped as necessary to fill the width of the containing block element.
/* Wrap text and collapse newlines, spaces and tabs */
p { white-space: normal; }
Setting whitespace to nowrap prevents text from wrapping for anything other than
the line break tag <br> . The pre (preformatted) value also prevents wrapping, but it also
preserves all whitespace characters. Its behavior is the same as the <pre> element in HTML.
Both the pre-wrap and pre-line values allow text to wrap as normal, with pre-wrap
preserving sequences of whitespace and pre-line collapsing them. The difference
between pre-line and normal is that pre-line preserves newline characters. Note that
the support for these last two values in IE was not added until version 8.
 
Search WWH ::




Custom Search