Web Design

(Nancy Kaufman) #1

115


CHAPTER

Formatting Your Pages 4


What unit of measurement should I use for
line-height?
Many designers rely on ems to set line height.
Because the exact size of an em is dependent on the
font size, using ems for line height ensures that the
height scales with the font. You can use decimals to
set fractional line height, so for example 1.5 ems sets
the line height to one and a half times the text size.

What is the advantage of using text-transform for
headings? Can I just not type the heading using
the correct case?
Large sites may have many people adding content,
and you cannot always control how they type the
content. Using text-transform guarantees that
headings use consistent casing.

● When viewed in a browser,
the main heading on the page
has the text transformation
applied, and the paragraphs
have the line height.

8 Type p.


9 Press.


0 Type {.


! Type line-height: ?;,
replacing? with the height
you want to apply.


@ Press.


Type }.


11

8


10


13


TIPS

Free download pdf