Text Formatting with CSS

One of the best uses of Cascading Style Sheets is to convert the drab appearance of HTML text into lavishly designed prose. Or, if you like a somber, corporate style, CSS can help with that, too. Whatever your design inclination, you can improve the look of your web text using CSS.

You can define six text-related CSS properties using the CSS mode of the Property Inspector, or use the full-blown CSS Rule Definition window to deploy more than 64 CSS properties. The most commonly used properties for text are stored in the Type and Block categories, while the List category offers several options for formatting bulleted and numbered lists.

Note

You can apply nearly every CSS property to text. For example, you can use the border property to underline text and the margin property to remove space between paragraphs. You’ll find those properties and others not listed in the Type or Block categories introduced later in this book (you don’t want to blow your circuits too quickly). For now, you’ll learn the most type-centric properties.

Choosing a Font

There are two ways to include fonts on a web page: The traditional method uses fonts installed on a visitor’s computer, while a newer technique lets you use specially prepared fonts—called web fonts. Dreamweaver CS6 provides a new tool for working with web fonts, which you’ll learn about on Using Web Fonts.

The traditional method relies on fonts already installed on a visitor’s computer. This mimics the way you use fonts in ...

Get Dreamweaver CS6: The Missing Manual 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.