Chapter 10. Formatting with Styles

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:

I should probably also note that while many of the properties discussed in this chapter apply mostly to text, that doesn't mean they only work with text. Many of them work just fine on other kinds of content as well.

We'll continue on with CSS layout in Chapter 11, Layout with Styles.

HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: