You are here: Reference > HTML > tags > img

img element

Browser support:
Embeds an image or video clip into the current document.
The img tag allows the insertion of .jpg, .png, .bmp and .gif image files into a HTML document. If you want to create one or more clickable regions within an image, use the map element.
If you want to see the HTML tags by categories, please visit this page.
This element cannot have a closing tag.
JavaScript page for this element: img.

Possible members:

Attributes
Events
Styles
Pseudos
accessKey
Sets an access key to an element.
align
Sets the object's position with respect to the surrounding text.
alt
Sets an alternate text that is displayed when the file associated with the element cannot be displayed.
border
Sets the thickness of the border.
class
Sets the style class or classes that belong to the element.
contentEditable
3
Sets whether the contents of the object are editable.
dataFld
Specifies which field of a given data source should be bound to the specified object.
dataSrc
Sets the identifier of the data source that is bound to the element.
dir
Sets the text direction as related to the lang attribute.
DISABLED
Sets the state of an object for user interaction.
draggable
3.55
Sets whether an element is draggable.
dynsrc
Sets the location of a movie file or VRML.
galleryImg
7
Sets whether the My Pictures toolbar in Internet Explorer is enabled for the current img.
height
Specifies the height of an element.
HIDEFOCUS
Specifies whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
hSpace
Specifies the number of pixels to use as a margin at the left and right sides of the object.
id
Sets a unique identifier for the object.
ISMAP
Sets a Boolean value that indicates whether an img is a server-side or client-side image map.
lang
Specifies the language of the element.
language
Sets the scripting language for the current element. Use it only for the script element.
longDesc
Specifies the URI (Uniform Resource Identifier) of the long description of a frame, iframe or img element.
loop
Specifies the number of repeats for a sound or video clip.
lowsrc
Specifies the location of a lower resolution image to display.
name
Sets the name of an element.
src
Sets the location of an associated file for an object.
start
Specifies the starting time of a video clip.
style
Sets an inline style associated with an element.
suppress
Sets whether the browser should be display the ALT text in the placeholder.
tabIndex
Specifies the tabbing order for keyboard navigation using the TAB key.
title
Specifies a tooltip for an element.
unSelectable
Sets whether the selection process can start in an element's content.
useMap
Sets the URL to use as an image map.
vSpace
Specifies the number of pixels to use as a margin at the top and bottom sides of an object.
width
Specifies the default width of the element.
xml:lang
Sets the language code of the XML document.

Example HTML code 1:

This example illustrates the use of the img element:
<img src="picture.gif" align="absmiddle" />
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content