Image width and height

The width and height of the image can also be changed or the actual width and height can be placed. Why do we use width and height? Width and height tells the computer to leave a space there for the image so the user can tell that there's suppose to be something going in between. Also, the page will not have to stretch later as the image is loading. Therefore, placing the width and height in the image code is a good progamming style, but it is not mandatory.

<img src="/demo.gif" border="0px" width="105px" height="42px" />

As mentioned above, you can also change the size of your image by changing the size of the width and height. By changing the width or height, you are either stretching or compressing the image. Below is an example (width=25px, height=25px):

<img src="/demo.gif" border="0px" width="25px" height="25px" />

Copyright Brains That Work .
Theme by Pool theme design by Borja Fernandez. ^Top^