CHAPTER 4

Including Images

To make your web pages richer and more appealing, you can include images in them. This chapter shows you how to create suitable image files using GIMP, the GNU Image Manipulation Program; insert images in your web pages and control how they appear; and display alternate text for browsers that cannot display an image file.

image

Grasp the Essentials of Web Image Formats

Launch GIMP and Perform Essential Moves

Rotate or Straighten an Image

Crop an Image

Resize an Image

Reduce the Number of Colors in an Image

Convert an Image to the Format You Need

Learn the HTML for Images

Insert an Image

Create a Figure with a Caption

Grasp the Essentials of Web Image Formats

Computers use many different image formats, from the JPEG format most digital cameras capture to the RAW format preferred by photography professionals, and from the animated GIF format to the business-oriented TIFF format. Most web browsers can display an impressive range of image formats, but to make your website generally accessible and fast to load, you must choose suitable formats for the images you include in your web pages. This section gives you an overview of key image formats. The following sections explain how to use the GIMP app to create suitable image files.

Understanding Why Image File Size Is Important

If you are creating web pages you will post on the Web, you will likely want to keep ...

Get Teach Yourself VISUALLY HTML and CSS, 2nd 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.