Easy Tutorial
❮ Event Ontoggle Prop Submit Type ❯

HTML DOM


Image Object

The Image object represents an embedded image.

Each occurrence of the <img> tag creates an Image object.


Image Object Properties

W3C: W3C Standard.

Property Description W3C
align Sets or returns the alignment of the inline content. Yes
alt Sets or returns the alternative text for images that cannot be displayed. Yes
border Sets or returns the border around the image. Yes
complete Returns whether the browser has finished loading the image. No
height Sets or returns the height of the image. Yes
hspace Sets or returns the white space to the left and right of the image. Yes
longDesc Sets or returns the URL to a document containing a long description of the image. Yes
lowsrc Sets or returns the URL to a low-resolution version of the image. No
name Sets or returns the name of the image. Yes
src Sets or returns the URL of the image. Yes
useMap Sets or returns the value of the usemap attribute for client-side image maps. Yes
vspace Sets or returns the white space above and below the image. Yes
width Sets or returns the width of the image. Yes

Image Object Events

Event Description W3C
onabort The event handler called when the user aborts the loading of an image. Yes
onerror The event handler called when an error occurs during the loading of an image. Yes
onload The event handler called when the image has finished loading. Yes

Standard Properties and Events

The Image object also supports standard properties and events.

❮ Event Ontoggle Prop Submit Type ❯