Hour 9Custom Backgrounds and Colors

Nearly every sample web page in Hours 1 through 8 has a white background and black text. In this hour, you’ll find out how to make pages with background and text colors of your choosing. You’ll also discover how to make your own custom background graphics and how to let the background show through parts of any image you put on your web pages.

Try It Yourself

The black-and-white figures printed in this book obviously don’t convey colors very accurately, so you may want to view the sample pages online. You can also try the colors on your own web pages as you read about how to make them.


Get Sams Teach Yourself HTML and CSS in 24 Hours, Seventh 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.