Chapter 6

Fancifying Pages with Colors and Backgrounds

IN THIS CHAPTER

Bullet Learning the oh-so-many ways to apply colors in CSS

Bullet Creating page backgrounds that are both fancy and schmancy

Bullet Leveling up your color game with gradients

Bullet Bringing out the best in your borders

Color is free on the web … Using different colors not only adds a bit of drama to the page, but also creates hierarchies for the content.

—ERIK SPIEKERMANN

I love black-and-white photography. There’s just something compelling and beautiful that rises to the surface when an image thumbs its nose at all the world’s reds, greens, and blues. It’s a brave and risky choice to present your art with such a stark palette.

However, I definitely do not love black-and-white web pages! Any site that offers nothing more than black text on a white background (or white text on a black background) tells me something important: That the page designer either didn’t care (or was too lazy) to put something beautiful on the web. Because that’s what colors do: They make a web page more beautiful, more vivid, and more interesting. Colors aren’t ...

Get HTML, CSS, & JavaScript All-in-One For Dummies 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.