Width and Height

100% Complete (success)

<img src="#" alt="..." title="..." width="..." height="..." />

Another set of attributes you should add every time is width="" & height="". The values passed to these attributes are a string with an integer, representing the width and height that the image is to be displayed at.

In most situations, the width and height of the image file should be the same width and height that you enter as attributes and want used in your web page. In the case that these differ, these attributes will scale the image file to the specified size passed to the attributes.

Another reason for including these attributes is that the web browser uses these to reserve the correct amount of space for the image on the page when rendering, even in the case where the page is rendered before the image file is delivered to the browser. This means that the page will not have to ‘re-render’ to accommodate an image that loads after the rest of the page.