HTML DOM Image Object

## JavaScript Reference

Overview

## JavaScript Objects

JS Array JS Boolean JS Date JS Math JS Number JS String JS RegExp JS Global

## Browser Objects

Window Navigator Screen History Location

## HTML DOM Objects

DOM Document DOM Elements DOM Attributes DOM Events

## HTML Objects

DOM Anchor DOM Area DOM Base DOM Body DOM Button DOM Form DOM Frame/IFrame DOM Frameset DOM Image DOM Input Button DOM Input Checkbox DOM Input File DOM Input Hidden DOM Input Password DOM Input Radio DOM Input Reset DOM Input Submit DOM Input Text DOM Link DOM Meta DOM Object DOM Option DOM Select DOM Style DOM Table DOM td / th DOM tr DOM Textarea

# HTML DOM Image Object

« Previous
Next Reference »

## Image Object

The Image object represents an embedded image.

For each <img> tag in an HTML document, an Image object is created.

Notice that images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.

## Image Object Properties

W3C: W3C Standard.

Property | Description | W3C
--- | --- | ---
align | Sets or returns the value of the align attribute of an image | Yes
alt | Sets or returns the value of the alt attribute of an image | Yes
border | Sets or returns the value of the border attribute of an image | Yes
complete | Returns whether or not the browser is finished loading an image | No
height | Sets or returns the value of the height attribute of an image | Yes
hspace | Sets or returns the value of the hspace attribute of an image | Yes
longDesc | Sets or returns the value of the longdesc attribute of an image | Yes
lowsrc | Sets or returns a URL to a low-resolution version of an image | No
name | Sets or returns the name of an image | Yes
src | Sets or returns the value of the src attribute of an image | Yes
useMap | Sets or returns the value of the usemap attribute of an image | Yes
vspace | Sets or returns the value of the vspace attribute of an image | Yes
width | Sets or returns the value of the width attribute of an image | Yes

## Image Object Events

Event | The event occurs when... | W3C
--- | --- | ---
onabort | Loading of an image is interrupted | Yes
onerror | An error occurs when loading an image | Yes
onload | An image is finished loading | Yes

## Standard Properties and Events

The Image object also supports the standard properties and events.

« Previous
Next Reference »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE