Web Design

(Nancy Kaufman) #1

116


Indent and Align Text ...........................................


2 Within an existing p declaration,
type text-indent: ?;,
replacing? with the amount of
first-line indentation you want.


1 In your editor, open a
document that contains
an embedded style sheet.


Indent and Align Text


C


SS can be used to control indentation of the first line of text and its alignment. The text-indent
property indents the first line of a block of text such as a paragraph. Note that only the first line

of text is indented. You can use any valid unit of measurement for this property, although pixels and


ems are the most common, and should experiment to determine what value gives you the best look.


The text-align property allows for values of center, left, right, and justify.


1


2

Free download pdf