In This Chapter
Building element-level styles
Creating external style sheets
Creating a multipage style
Managing cascading styles
Using conditional comments
CSS is a great tool for setting up the visual display of your pages. When you first write CSS code, you're encouraged to place all your CSS rules in a
style element at the top of the page. CSS also allows you to define style rules inside the body of the HTML and in a separate document. In this chapter, you read about these alternative methods of applying style rules, when to use them, and how various style rules interact with each other.
Styles can be applied to your pages at three levels:
A style can be defined directly in the HTML body. Figure 5-1 is an example of this type of code. A local style is also sometimes called an element-level style, because it modifies a particular instance of an element on the page.
Figure 5.1. This page has styles, but they're defined in a new way.
You can't see the difference from Figure 5-1, but if you look over the code, you'll see it's not like the style code you ...