Chapter 4. Images

IMAGES ARE PERHAPS the most obvious way to add visual appeal to a web page. If you want anything more than the most minimal of minimal sites you’ll want to use images in one way or another, whether it’s showing off your holiday photos or adding curved corners to your layout. Images also used to be used all over the place to help lay out pages as invisible “spacer GIFs,” but now that we’ve got CSS layout on our side (see Chapter 5, “Layout”), we can do away with those crazy days.

You can split the use of images quite neatly into two camps: one for content (such as those holiday photos) and one for presentation (that’ll be those curved corners), and unless you’ve just opened the book for the first time and landed on this page, ...

Get HTML Dog: The Best-Practice Guide to XHTML & CSS 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.