Web Design

(Nancy Kaufman) #1

108


Set Text Color .......................................................


● When viewed in a browser,
the text on the page is now
in the specified color.

1 In your editor, open a page
that contains an embedded
style sheet with an existing
body style declaration.
2 Within the declaration, type
color: #?;, replacing?
with a hexadecimal value for
the color you want to use.

Set Text Color


T


he CSS color property technically applies a color to the foreground of any element. In practice,
however, only text is in the foreground; thus, the property is used most often to change the

color of text. Be sure that the color you choose fits within your site’s design, but also provides


sufficient contrast with the background of your page to ensure that the text remains readable. You


can apply color to entire blocks of text, or, as is shown in later sections, to individual words or even


characters.


1


2

Free download pdf