CHAPTER 5Color, Backgrounds,and Images

The beauty of CSS is that it allows us to separate presentation from content. The entire core content such as text and key images are locked up in the (X)HTML, leaving all the actual styling kept tidily separated in the style sheet. Therefore, the style sheet is the place to specify all the creative stuff, including color and placement of decorative images.

Applying color to text and containers is pretty easy using CSS, as is the application of background images, although it is important to plan ahead and ensure the minimum number of images are used for maximum effect. That said, background images are the key to realizing the creative potential of CSS-based web design, and they literally transform your ...

Get Beginning CSS Web Development: From Novice to Professional now with O’Reilly online learning.

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