Adding Height and Width Tags to Your Images



Always give the HEIGHT and WIDTH (in pixels) of an image in the IMG tag. This helps your page load faster.
September, from the Tres Riches HeuresDon't know the HEIGHT and WIDTH of your IMG? Either your browser can tell you this from the "View" Command on the Menu bar or you can look at it using a freeware photo/graphics viewing program (like the one that ships with Windows 95 and 98). Specifying WIDTH and HEIGHT is especially important with slow-loading, large picture files (more than 20k file size) or when integrating text and pictures closely.
   Not recommended but cool to know: You can even resize an image right on your webpage by changing the HEIGHT and WIDTH dimensions (try and keep them in proportion to the original measurements, or your picture will appear distorted). But it can shrink a large image to viewable size quickly (and without having to learn all the bells and whistles of yet another program) Why don't we recommend this? Because the filesize will remain as big and as slow-loading as before.
   Bonus: You can alter the Height and Width to change the picture size on the fly. Just make sure to keep the proportions or your picture will be distorted.
   The lesson? Take the time to find out and type in the heights and widths of your image files, especially for large files (you can find out file size from looking at the number listed beside the picture's file name in your File Manager). Your site visitors will thank you for helping them to get the pictures!

Back to the Tip Archive


Created by Ancarett. Updated 28 June, 2001.