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 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.