10. Formatting with Styles

As we saw in Chapter 4, Basic (X)HTML Formatting, (X)HTML has a rather limited repertoire of text formatting options. Thankfully, CSS offers many more possibilities.

With CSS, you can change the font face, size, weight, slant, line height, foreground and background color, spacing and alignment of text, decide whether it should be underlined, overlined, struck through, or blinking, and convert it to all uppercase, all lowercase, or small-caps. And you can apply those changes to an entire document or an entire site. In this chapter, you’ll learn how.

Figure 10.1. Here is what the page looks like with no style sheet applied. You can find the source XHTML code in the Examples section of my site: http://www.cookwood.com/html6ed/examples/ ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart 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.