3.4. Embedded Images

The IMG element enables you to insert images into the document. Most browsers support GIF (Graphics Interchange Format), JPEG (Joint Photographic Experts Group), and PNG (Portable Network Graphic) formats, but some browsers support others such as xbm, xpm, or bmp either directly or through plug-ins. In most cases, GIF images are more compact than JPEGs for images that have few color changes, such as drawings generated by graphics packages. JPEGs tend to be smaller for images with many changes, such as scanned photographs. Because image loading time can dominate the total Web page loading time, trying images both ways and checking ...

Get Core Web Programming, Second Edition now with O’Reilly online learning.

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