Home Home -> HTML Reference -> Tag Reference - img

Tag Reference - img

Description

Attributes


align
Sets the alignment of the object, relative to the text. An alignment of left, right or centre will cause text to flow around the object.

alt
Alternative text when the tag is not supported.

border
Sets the width of the border around the object.

class
The CSS style class to be applied to this tag. This could be used, for example, to create a style for "important" items, using a line in the style sheet as below:

.important { font-color: red }

This can be applied to the tag as follows:

<b class="important">This is important.</b>

datafld
In Internet Explorer 4 and above, this specifies the column name from the data source which supplies the data for this tag.

datasrc
In Internet Explorer 4 and above, this specifies the "id" of the data source object which will supply the data for this tag.

dir
Overrides the direction of the text from the standard direction. "rtl" displays the text from right to left, "ltr" from left to right.

height
Sets the height of the object.

hspace
Specifies the horizontal spacing around the object.

id
A unique alphanumeric identifier used to identify this object/tag. This identifier can be used in scripting languages to refer to the tag or object.

ismap
Indicates that the image is a server-side image map.

lang
The language of the text enclosed by this tag, as defined in RFC 1766 (eg en-gb for British English).

language
In Microsoft's implementation, sets the language for the scripts defined in the tag's event handlers.

longdesc
The attribute specifies the URL of a file with a long description of what the frame contains.

loop
Specifies how many times to loop the sound. A value of "infinite" will result in an (annoying) endless loop.

lowsrc
A low-resolution version of the image, to be displayed while the larger version is loading.

name
Defines a name for this tag - in <a> tags it may be used in a hyperlink to jump directly to the tag's location.

name
Defines a name for this tag - in <a> tags it may be used in a hyperlink to jump directly to the tag's location.

src
Specifies the URL of the source file for this element.

style
Inline style-sheet information.

title
Advisory text for this tag - this could define an abbreviation or acronym, explain where a link goes or provide some other useful description.

usemap
Indicates that the image is a client-side image map as defined by the URL in the value. This should normally be an internal URL (i.e. starting with #) which points to a named <map> element within the current page.

vspace
Specifies the vertical space around the object.

width
Sets the width of the object.

width
Sets the width of the object.