10. Formatting Text with Styles

In This Chapter

Choosing a Font Family

Specifying Alternate Fonts

Creating Italics

Applying Bold Formatting

Setting the Font Size

Setting the Line Height

Setting All Font Values at Once

Setting the Color

Changing the Text’s Background

Controlling Spacing

Adding Indents

Setting White Space Properties

Aligning Text

Changing the Text Case

Using Small Caps

Decorating Text

With CSS, you can change the font, size, weight, slant, line height, foreground and background color, and spacing and alignment of text. You can decide whether it should be underlined or struck through, and you can 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 ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition 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.