Name
HEIGHT, WIDTH — NN all IE all HTML 3.2
Synopsis
HEIGHT=”length"WIDTH=”length"Optional
Define the dimensions for the space on the page reserved for the image, regardless of the actual size of the image. For best performance (and backward script compatibility), you should set these attributes to the actual height and width of the source image. If you supply a different measure, the browser scales the image to fit the space defined by these attributes.
Example
<IMG SRC="surferDude.gif" HEIGHT=100 WIDTH=200>
Value
Positive integer values (optionally quoted) or percentage values (quoted).
Default
Actual size of source image.
Object Model Reference
- NN
[window.]document.imageName.height
[window.]document.images[i].height
[window.]document.imageName.width
[window.]document.images[i].width
- IE
[window.]document.imageName.height
[window.]document.images[i].height
[window.]document.imageName.width
[window.]document.images[i].width
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access