0% found this document useful (0 votes)
6 views1 page

CSSDFTW

The document discusses the line-height and word-spacing properties in Cascading Style Sheets (CSS). It explains how to adjust line height for spacing effects and the word-spacing property that allows for customization of space between words. Both properties are inherited by child elements, with specific behaviors regarding their values and calculations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

CSSDFTW

The document discusses the line-height and word-spacing properties in Cascading Style Sheets (CSS). It explains how to adjust line height for spacing effects and the word-spacing property that allows for customization of space between words. Both properties are inherited by child elements, with specific behaviors regarding their values and calculations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Cascading Style Sheets

a smaller line height. An effect similar to double spacing can be achieved


by setting the line height to 2.0. This is too much for most cases, but it
is sometimes required.
Because this property specifies the minimum distance between the
baselines of the lines, an inline element with a larger line height or an
inline image may cause lines to be farther apart than expected.

THE WORD-SPACING PROPERTY


The word-spacing property enables you to adjust the amount of
spacing between words. Each font has a normal word spacing – the
amount of space that is put between words – that should be used in the
“ideal” situation (ideal according to the font’s designer). Browsers try to
use this value. However, you may sometimes want to achieve certain
effects with your text by expanding or shrinking the word spacing.

FF Op Sa IE Pr Name: word-spacing
● ● ● ● ○
Value: normal | <length>
Initial: normal
Applies to: all elements
Inherited: yes
Percentages: N/A

There are two values:


• normal – Word spacing is left up to the browser. This is the
default.
• Length – Either an absolute or relative value.
Any length value is added to the normal word spacing; thus, 0 and
normal mean the same thing.
word-spacing is an inherited property. The amount of word
spacing is computed once for the parent element and the result is inher-
ited by all of its children. The value is not computed again for its child
elements even if they have a different font size. For example, if the
current font size of the parent element is 10pt and the word spacing is
set to 1em, its child elements will inherit a word spacing of 10pt no
matter their font size.

160

You might also like