[Chapter 21] Reference: Image.width
Author: David Flanagan
Date: Fri Aug 29 11:16:49 1997

#

| Chapter 21 JavaScript Reference |

# Image.width Property

## Name

Image.width Property---the width of an image

## Availability

Navigator 3.0

## Synopsis

    image.width

## Description

The `width` property of the Image object is a read-only integer that specifies the width of `image`. It is set by the `WIDTH` attribute of the `<IMG>` HTML tag.

The `WIDTH` attribute is optional in HTML, but including it greatly improves the layout time of your pages. Also, because of a bug, in Navigator 2.0 all images in a page that contains JavaScript must have `WIDTH` and `HEIGHT` attributes specified (even though the `Image` object is not available in 2.0).

## See Also

"Image"

Image.vspace |  | isNaN()