IMGIMG*
*Contents  *Index  *Topic Contents
*Previous Topic: IFRAME
*Next Topic: INPUT

IMG

Description

Embeds an image or a video clip in the document.

Syntax

<IMG
ALIGN=ABSBOTTOM | ABSMIDDLE | BASELINE | BOTTOM | LEFT | MIDDLE | RIGHT | TEXTTOP | TOP
ALT=text
BORDER=n
CLASS=classname
DATAFLD=colname
DATASRC=#ID
DYNSRC=url
HEIGHT=n
HSPACE=n
ID=value
ISMAP
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
LOOP=n
LOWSRC=url
NAME=name
SRC=url
STYLE=css1-properties
TITLE=text
USEMAP=url
VSPACE=n
WIDTH=n
event = script
>

ParameterDescription
ALIGN=ABSBOTTOM | ABSMIDDLE | BASELINE | BOTTOM | LEFT | MIDDLE | RIGHT | TEXTTOP | TOP Specifies the alignment for the image.
ALT=text Optional text as an alternative to the graphic for rendering in non-graphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.
BORDER=n Specifies the thickness of a border to be drawn around the element.
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
DATAFLD=colname The column name from the data source object that supplies the bound data.
DATASRC=#ID Indicates the ID of the data source object that supplies the data that is bound to this element.
DYNSRC=url Specifies the address of a video clip or VRML world to be displayed in the window. Stands for Dynamic Source.
HEIGHT=n Along with WIDTH, specifies the size at which the element is drawn. This attribute may be initially set in pixels or percentages.
HSPACE=n Along with VSPACE, specifies margins for the element.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
ISMAP Identifies the picture as a server-side image map. Image maps allow users to access other documents by clicking different areas in an image. Server-side image maps require a script or other service on the server to process click information. When the user clicks on the image, the server receives the coordinates of the user's click along with the URL of the map. Internet Explorer appends a "?" and a comma-separated pair of x-y coordinates to the HREF attribute in the A element. For further information regarding server-side maps and the content of the map file, check your HTTP server documentation.
LANG=language Specifies which language to use in ISO standard language abbreviation form.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
LOOP=n Specifies how many times a sound or video will loop when activated. Also specifies how many times the marquee should loop.
LOWSRC=url Specifies a lower resolution image to display.
NAME=name Specifies the name of the control.
SRC=url Specifies a URL for the associated file.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
USEMAP=url Identifies the picture as a client-side image map and specifies a MAP to use for responding to the user's clicks. Use the MAP and AREA elements to create the client-side mapping information.
VSPACE=n Along with HSPACE, specifies margins for the element.
WIDTH=n Along with HEIGHT, sets the initial size of the element. This attribute may be initially set in pixels or percentages.
event Can be one or more of these events:
onabort onafterupdate
onbeforeupdate onblur
onclick ondblclick
ondragstart onerror
onfocus onhelp
onkeydown onkeypress
onkeyup onload
onmousedown onmousemove
onmouseout onmouseover
onmouseup onresize
onrowenter onrowexit
onselectstart

Example

<IMG SRC=mygraphic.bmp>

Scripting Object

IMG

See Also

AREA, INPUT, MAP


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.