Image width property
Image Object
Definition and Usage
The width property sets or returns the value of the width attribute of an image.
The width attribute specifies the width of the image.
Syntax
imageObject.width=
pixels
Browser support





All major browsers support the width property
Example
Example
Change the height and width of the image:
Try it »
Image Object