Images on the Web

Images displayed on the Web should be converted to one of the formats supported by most browsers: GIF, JPEG, or PNG. GIF and JPEG are the popular standards, and every graphical browser supports them. PNG is a newer image format that was created in response to some patent issues with the GIF format. It's superior to GIF in almost every respect, but old browsers don't support it. Many other image formats are supported by some browsers and not others. You should avoid them.

Let's assume that you already have an image you want to put on your web page. How do you get it into GIF or JPEG format so it can be viewed on your page? Most image editing programs, such as Adobe Photoshop (, Paint Shop Pro (, and CorelDRAW (, will convert images to most of the popular formats. You might have to look under the option for Save As or Export to find the conversion option. There are also freeware and shareware programs for most platforms that do nothing but convert between image formats. Many shareware and demo versions of image editing programs are available at (search for "image editors" using the software platform of your choice).


If you're a Windows user, you can download IrfanView, which allows you to view images, and convert them to various formats, at It also provides a number of other image manipulation features that are useful for working with images for the Web. Best of all, it's free for non-commercial use.

To save files in GIF format, look for an option called CompuServe GIF, GIF87, GIF89a, or just plain GIF. Any of them will work. If you're saving your files as JPEG, usually the option will simply be JPEG.

Remember how your HTML files have to have an .html or .htm extension to work properly? Image files have extensions, too. For GIF files, the extension is .gif. For JPEG files, the extensions are .jpg and .jpeg.


Some image editors will try to save files with extensions in all caps (.GIF or .JPEG). Although they're the correct extensions, image names are case sensitive, so .GIF isn't the same extension as .gif. The case of the extension might not be important when you're testing on your local system, but it can be when you move your files to the server. So, use lowercase if you can.

Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day
Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day (5th Edition)
ISBN: 0672328860
EAN: 2147483647
Year: 2007
Pages: 305

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: