It’s a good idea to specify the width and height of an image when using an <img> tag. For example:
<img src="myphoto.jpg" width="234" height="123">
The advantage of doing this is that the Web browser can format the page more quickly as it is loaded, as it knows how to lay out the images before they’ve been downloaded. This means that your visitors can start surfing your page without having to wait for all the images to display!
Most graphics packages (Photoshop, Paint Shop Pro, etc) allow you to view the width and height of an image (in pixels) so that you can slot the values into the <img> tag. You can also right-click on the image and select Properties (in Internet Explorer) or view the image in a window on its own and read the width and height in the title bar (in most other browsers).
Leave a Reply