The width and height attributes are used, such that downloading of an image will be faster after knowing the dimensions of the images in the browser.