Chapter 3. Styling Text

The main message of most of your Web sites will be conveyed by the site’s text. When you add text, you need to deal with two different aspects of the text: its structure and its presentation. The structure, implemented with XHTML, includes things like paragraphs, headings, lists, and the like; presentation (applied using CSS) is how the text looks, including things like the font, font size, text color, and so on.

Using CSS styles, your site doesn’t just look good—you get other benefits as well. Because the CSS stylesheet is separate from the XHTML, it’s easy to make changes in your site’s look simply by modifying the CSS rules in the stylesheet.

In this chapter, we’ll focus on creating and applying CSS rules for your site’s ...

Get Styling Web Pages with CSS: Visual QuickProject Guide 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.