I'm sure everyone has encountered a web page where it takes forever for the images to appear, and you sit there staring at a blank screen. There are things you can do to make sure that does not happen to visitors to your web pages. One trick that helps is to specify the sizes of the images on your web pages. That way, the user's browser can reserve the appropriate spaces for the images and can go ahead and load the text of the page. Visitors can at least have something to read while they wait for the images to finish loading.
Determining the size of an imageIn order to specify the size of an image, you'll first have to figure out what the image dimensions are. The image dimensions are measured in units called "pixels", which are points on an image. Your computer monitor is also measured in pixels - the most common size or resolution is 640x480 pixels. A pixel is about the size of a period on your browser.
There are probably lots of ways to figure out how big an image is. I'll talk about two:
Method 1 - Your browser
Method 2 - A graphics software package
Specifying the size of the image in your HTML fileIn the image statement, add an option which defines the size of the image (in pixels). For example, if the image is 50x75, the HTML code would be:
<a href="example.gif"><img src="example.gif" alt="" width="50" height="75"></a>
© 2004 by Aphids Communications, L.L.C., all rights reserved. Text, graphics, and HTML code are protected by US and International Copyright Laws, and may not be copied, reprinted, published, translated, hosted, or otherwise distributed by any means without explicit permission of the copyright owner. Aphids and Aphids Communications are trademarks of Aphids Communications, L.L.C.