When using the IMG tag, you can specify the size with the WIDTH and HEIGHT parameters. The file up.gif, for example, is 45 pixels square. This can be indicated as:

When using the IMG tag, you can specify the size with the WIDTH and HEIGHT parameters. The file up.gif, for example, is 45 pixels square. This can be indicated as:
<IMG SRC="up.gif" WIDTH=45 HEIGHT=45>
<IMG SRC="up.gif" WIDTH=90 HEIGHT=90>

You should be careful using the WIDTH and HEIGHT parameters to change the size of an image. You can distort an image by trying to make a small picture bigger or by changing the ratio of height to width. Here is a picture which is 250 by 185 pixels, displayed at 400 by 200 pixels:

Even if you retain the correct ratio, resizing the image this way could result in distortion and poor image quality. Enlarging a photo, for example, will usually cause problems. Here is the same image enlarged 50% (375 by 277 pixels):

In most cases, it is best to display an image in its original size. You should use graphics software to change the size of an image instead of WIDTH and HEIGHT.
One exception is to use these settings to display a line or box of a certain color. You could create a tiny GIF file 1 pixel by 1 pixel of a particular color and then stretch it out on the web page. Here is an example using a blue image:
<IMG SRC="blue.gif" WIDTH=450 HEIGHT=2>
Using the same image at a height of 10 and width of 350 would create a different line:
This technique can be an effective way to create lines and dividers of different sizes without having to save and download multiple files.