The fine detail of images using HTML

In previous columns we investigated some basic image tips and the necessary syntax for coding an image into your Web site.

<IMG src="picture.jpg" alt="This is a picture" border="0" width="150" height="150">

This time we look in more detail at the images themselves: their properties, where you can find them, and how to optimise them for the Internet.


When teaching HTML, I have often been asked how to create the actual graphic with code. Many people don't realise that the creation of the image is separate to its insertion into a Web site. Graphics are created as separate entities which may or may not be used on Web pages, in the same way that they may or may not be used for word processing, or with greeting card software.

GIFs and JPGs

There is a variety of uses for images, and therefore a variety of image formats. Usually you can tell what file type you have by looking at the extension (the last letters after the full stop in the filename). For the Internet, the dominant file formats are GIFs and JPEGs (JPGs). They should be set to a resolution of 72dpi (dots per inch) for Web use.

GIFs are used for graphics that don't require an extensive range of colours. Most clipart or cartoon-style images are GIFS. Additionally, most animated graphics you see on the Internet are in this format. JPGs, on the other hand, are for images that are generally of photographic quality and that usually require many shades of the same colour.

The use of images in your Web site comes with a potential drawback. If too many are used or your images are not optimised for Internet viewing, they may increase the load time of your site. To overcome this, many graphic programs, such as Adobe Photoshop, allow you to optimise your images to a smaller file size without losing picture quality.

However, if you don't have access to such a program, Web sites have services that will do this for you. Take Net Mechanic ( as an example. Simply enter the URL of your graphic or, alternatively, upload it from your local machine. The site will then return a number of variations of your image; choose where the balance between file size and image quality is best, and save that version onto your local machine for use on your site. See FIGURE 1 for example results of a given image.

Image location

There are two main ways to collect your images for the Internet: either search the Internet for the graphic (animated, static or photograph), or create it electronically yourself.

For the purposes of this discussion, let's assume you want to locate a moving picture of a dog. Simply go to a search engine such as Yahoo ( and, in the search box, type "free images" & "dog" & "animated gif". You will be confronted with thousands of sites with potential images you could save.

To save an image from the Internet, simply hover your mouse over the image, right-click your mouse and select Save Picture As. You can then determine where on your computer you want to save it, and reference it accordingly in your code.

Alternatively, you can link to a graphic while it is on someone else's server using the absolute URL of the graphic. A potential problem with this route is that if that site's server goes down, viewers won't be able to see the graphic on your Web site any more. This is definitely not the best option.

Using this search technique, you can locate backgrounds, animated graphics, dividers and bullets, as well as normal photographs... many for free. It is very important to check the copyright on images before you use them on your Web site, just in case.

The second way to collect images is to create them yourself; previous Here's How Graphics columns will give you more infor­mation on this. With the right knowledge, you can create your own standard images, animated graphics, scan in images or even use photos from a digital camera.

Following this advice, not only will you know more about images but you'll be able to insert them into your Web site and be sure they are at minimum size and maximum quality for your situation.

Join the PC World newsletter!

Error: Please check your email address.

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Heidi Woof

PC World
Show Comments

Cool Tech

Crucial Ballistix Elite 32GB Kit (4 x 8GB) DDR4-3000 UDIMM

Learn more >

Gadgets & Things

Lexar® Professional 1000x microSDHC™/microSDXC™ UHS-II cards

Learn more >

Family Friendly

Lexar® JumpDrive® S57 USB 3.0 flash drive 

Learn more >

Stocking Stuffer

Plox Star Wars Death Star Levitating Bluetooth Speaker

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest News Articles


GGG Evaluation Team

Kathy Cassidy


First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni


For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Steph Mundell


The Fujitsu LifeBook UH574 allowed for great mobility without being obnoxiously heavy or clunky. Its twelve hours of battery life did not disappoint.

Andrew Mitsi


The screen was particularly good. It is bright and visible from most angles, however heat is an issue, particularly around the Windows button on the front, and on the back where the battery housing is located.

Simon Harriott


My first impression after unboxing the Q702 is that it is a nice looking unit. Styling is somewhat minimalist but very effective. The tablet part, once detached, has a nice weight, and no buttons or switches are located in awkward or intrusive positions.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?