Help Center

Local Navigation

Object: HTMLImageElement

Availability

BlackBerry® Device Software version 4.6 or later

Extends

HTMLElement

The HTMLImageElement object represents an <img> element in an HTML document.

The <img> element defines an image to display.

HTMLImageElement properties

Property name

Type

Description

Status

Support level

Availability

align

DOMString

Specifies the vertical or horizontal alignment of the image on the page.

writable

DOM 2 HTML

4.6 or later

alt

DOMString

Specifies the text that appears when an image is unavailable or cannot be displayed.

writable

DOM 2 HTML

4.6 or later

border

DOMString

Specifies the width of a border around an image.

writable

DOM 2 HTML

4.6 or later

height

int

Specifies the width of a border around an image.

writable

DOM 2 HTML

4.6 or later

hspace

int

Specifies the amount of whitespace padding added to the left and right of the image.

writable

DOM 2 HTML

4.6 or later

isMap

boolean

When true, indicates that the image uses a server-side image map.

writable

DOM 2 HTML

4.6 or later

longDesc

DOMString

Specifies the URI of a document that provides a long description of the image.

writable

DOM 2 HTML

4.6 or later

name

DOMString

Specifies a unique name for the image.

writable

DOM 2 HTML

4.6 or later

src

DOMString

Specifies the URI of the source image.

writable

DOM 2 HTML

4.6 or later

usemap

DOMString

Specifies the client-side map to use with this image.

writable

DOM 2 HTML

4.6 or later

vspace

int

Specifies the amount of whitespace padding added to the top and bottom of the image.

writable

DOM 2 HTML

4.6 or later

width

int

Specifies the width of the image, with the unit of measurement.

writable

DOM 2 HTML

4.6 or later


Was this information helpful? Send us your comments.