Chapter 9. Styling with Fonts and Colors: Expanding your Vocabulary
Your CSS language lessons are coming along nicely. You already have the basics of CSS down and you know how to create CSS rules to select and specify the style of an element. Now it’s time to build your vocabulary, and that means picking up some new properties and learning what they can do for you. In this chapter we’re going to work through some of the most common properties that affect the display of text. To do that, you’ll need to learn a few things about fonts and color. You’re going to see you don’t have to be stuck with the fonts everyone else uses, or the clunky sizes and styles the browser uses as the defaults for paragraphs and headings. You’re also going to see there is a lot more to color than meets the eye.
Text and fonts from 30,000 feet
A lot of the CSS properties are dedicated to helping you style your text. Using CSS, you can control typeface, style, color, and even the decorations that are put on your text, and we’re going to cover all these in this chapter. We’ll start by exploring the actual fonts that are used to display your pages. You’ve already seen the font-family
property and in this chapter you’re going to learn a lot more about specifying fonts.
Before we dive in, let’s get the 30,000 foot view of some properties you can use to specify and change the look of your fonts. After that, we’ll take ...
Get Head First HTML with CSS & XHTML now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.