Search w3schools.com:

SHARE THIS PAGE

HTML DOM Image Object


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.

Note: The Image object can also use the properties/methods of:


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.



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]