Chapter 6. Use Style Sheets

In previous chapters, you saw how Cascading Style Sheets (CSS) save you time in creating and formatting pages. Using those examples, you learned how to change and create style rules. In this chapter, we go a bit deeper, formatting elements based on their use or context.

You’ll learn to create a variety of styles to cover virtually all your needs. Tag-based styles, also known as element-based styles, apply to a specific HTML element, such as every h1 or li tag. Compound styles—also know as context-based styles—enable you to apply a style when a certain combination of tags appears in a specific context, such as the page’s header or sidebar. Finally, class-based styles are not pegged to a particular tag and, so, can be ...

Get Creating a Web Site in Dreamweaver CS4: Visual QuickProject Guide 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.