Chapter 3. Introducing Cascading Style Sheets

If you use garden-variety HTML tags like <h1>, <p>, and <ul> to style web pages, what you see onscreen pales in comparison to the 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.

Fortunately for web designers, you can change the ho-hum appearance of HTML using the options you get with a formatting standard 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 design (the paint; carpeting; and color, style, and placement of furniture).

CSS gives you much greater control over the layout and design of your pages than HTML does. Using CSS, you can improve the look of common web page elements like links, images, and tables. For example, 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. Dreamweaver’s CSS Designer tool makes it fast and easy to create styles and then store them in a central style sheet that controls the look of all the pages in your site.

CSS is a big 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 instructions in nearly every chapter. In this chapter, ...

Get Dreamweaver CC: The Missing Manual, 2nd 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.