1. Computing & Technology

Discuss in my forum

Always Use width and height in the img Element

By , About.com Guide

When adding images to Web pages it's easy to skip these two vital attributes. They are not required in XHTML and many people feel that they don't serve any useful purpose.

They are wrong.

The width and height attributes define how wide and tall the browser should render the image. If you don't define these numbers for your image, you'll end up with an image that renders comparatively slowly as the browser has to guess what size the image is.

©2012 About.com. All rights reserved.

A part of The New York Times Company.