The Cascade: When Rules Collide

Styles come from many sources. As you learned in Chapter 1, every browser has its own default styles. But you can apply your own styles to override or complement those in three ways: You can load one or more from an external file (the recommended method) Image, insert them at the top of an HTML document, or apply them to a specific HTML element right in the code (though this is to be avoided whenever possible). See the next chapter for specifics about each method.

Image This is the style sheet for the HTML document in . Don’t ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.