04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Add color to your text <strong>with</strong> the color property.<br />

You can change your text color <strong>with</strong> the color property. To do that, it<br />

helps to know a little about Web colors, and we’ll take you through all the<br />

ins and outs of color, including the mysterious color “hex codes.”<br />

body {<br />

color: silver;<br />

}<br />

Affect the weight of your fonts <strong>with</strong> the font-weight property.<br />

Why settle for boring, average fonts when you can give them some extra<br />

weight when needed? Or, are your fonts looking too heavy? Slim them down<br />

to a normal weight. All this is easily done <strong>with</strong> the font-weight property.<br />

body {<br />

font-weight: bold;<br />

}<br />

Add even more style to your text <strong>with</strong> the text-decoration property.<br />

Using the text-decoration property you can decorate your text <strong>with</strong><br />

decorations including overlines, underlines, and line-throughs. And if you didn’t<br />

get enough of blinking text on the Web in the 1990s, the designers of <strong>CSS</strong> have<br />

even included a blink value for text-decoration (although thankfully they<br />

don’t require browsers to implement it).<br />

body {<br />

text-decoration: underline;<br />

}<br />

styling <strong>with</strong> fonts and colors<br />

Aqua<br />

Fuchsia<br />

Lime<br />

Olive<br />

Red<br />

White<br />

Black<br />

Gray<br />

Maroon<br />

Orange<br />

Silver<br />

lighter<br />

normal<br />

bold<br />

bolder<br />

none<br />

Yellow<br />

underline<br />

overline<br />

Blue<br />

Green<br />

Navy<br />

Purple<br />

Teal<br />

line-through<br />

blink<br />

you are here 343

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!