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

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.