Help Center

Local Navigation

HTML element: <img>

Availability

BlackBerry® Device Software 3.7 or later

The <img> element defines an image to display.

Attributes

Attribute

Value(s)

Description

Availability

align

bottom

left

middle

right

top

Deprecated. This attribute specifies the vertical or horizontal alignment of the image on the page.

When the page is displayed in Column view, images are aligned horizontally. The BlackBerry® Browser only accepts the following values:

  • align=“left”
  • align=“right”

Vertical alignment is ignored.

3.7 or later

alt

text

Required. This attribute specifies the text that appears when an image is unavailable or cannot be displayed.

3.7 or later

border

pixels

Deprecated. This attribute specifies the width of a border around an image.

4.6 or later

height

length

This attribute specifies the height of the image, in pixels.

3.7 or later

hspace

pixels

Deprecated. This attribute specifies the amount of whitespace padding added to the left and right of the image.

4.6 or later

longdesc

URI

This attribute specifies the location of a document that provides a long description of the image.

4.6 or later

src

URI

Required. This attribute specifies the URI of the source image.

3.7 or later

usemap

URI

This attribute specifies the image as a client-side image map.

3.7 or later

vspace

pixels

This attribute specifies the amount of whitespace padding added to the top and bottom of the image.

4.6 or later

width

length

This attribute specifies the width of the image, with the unit of measurement.

3.7 or later

Common attributes

The <img> element supports the class, dir, id, lang, style, and title attributes.

For more information, see Common attributes.

Event attributes

The <img> element supports the onclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, and onmouseup events.

For more information, see HTML event attributes.

Index


Was this information helpful? Send us your comments.