Chapter 4. Introducing Cascading Style Sheets

What you see on a web page when you use garden-variety HTML tags like <h1>, <p>, and <ul>, pales in comparison to the text and styling on display in, say, a print magazine. If web designers had only HTML to make their sites look great, the Web would forever be the ugly duckling of the media world. HTML doesn’t hold a candle to the typographic and layout control you get when you create a document in even the most basic word processing program.

Fortunately for web designers, you can change the ho-hum appearance of HTML using a technology called Cascading Style Sheets (CSS). CSS gives you the tools you need to make HTML look beautiful. If you think of HTML as the basic structure of a house (the foundation, walls, and rooms), then CSS is the house’s interior decoration (the paint, carpeting, and the color, style, and placement of furniture). CSS gives you much greater control over the layout and design of your pages. Using it, you can add margins to paragraphs (just as in a word processor), colorful and stylish borders to images, and even dynamic rollover effects to text links. Best of all, Dreamweaver’s streamlined approach lets you combine many of these design properties into powerful, centralized style sheets that let you control pages throughout your site.

CSS is a large topic. It’s also the heart of today’s cutting-edge web design. So instead of dedicating just a single chapter to it, this book provides instruction in the fine art of using CSS in nearly every chapter. In this chapter, you’ll learn the basics of CSS and how to use Dreamweaver’s powerful CSS tools. In the next few chapters you’ll learn how CSS can improve the look of common web page elements like links, images, and tables. Once you’re comfortable with the basics, you’ll find in-depth information on CSS in Chapters Chapter 8 and Chapter 9. And in Chapter 10, you’ll learn how to harness the power of CSS to fully control the layout of a web page.

Get Dreamweaver CS5: 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.