404 Chapter 23 – Cascading Style Sheets
Properties
Web Design in a Nutshell, eMatter Edition
Applies to:
All elements
Inherited:
Yes
Theline-heightproperty sets the distance between the baselines of adja-
cent lines of text. In traditional publishing, this measurement is called
“leading” and can be used to create different effects by adding white space to
the block of text.
The default value isnormal, which corresponds to 100–120% depending on
the browser’s interpretation of the tag. When a number is specified alone, that
number will be multiplied by the current font size to calculate theline-
heightvalue. Line-heights can also be specified using any of the length units
described earlier. Percentage values relative to the current (inherited) font size
may also be used.
These examples demonstrate three alternative methods for the same amount
of line spacing. For example, if the point size is 12 pt, the resulting line-height
for each of the examples listed would be 14.4 pts.
word-spacing
Values:
normal|length
Example:
H3 { word-spacing: .5em }
Applies to:
All elements
Inherited:
Yes
This property specifies an additional amount of space to be placed between
words of the text element. Note that when specifying relative lengths (such as
em, which is based on font size), thecalculatedsize will be passed down to
child elements, even if they have a smaller font size than the parent.
letter-spacing
Values:
normal|length
Example:
P.opener:firstline { letter-spacing: 2pt }
Applies to:
All elements
Inherited:
Yes