Version-//W3C//DTD HTML 4.01 Transitional//EN
ElementIMG
PurposeEmbedded image
DescriptionThis element places an image in a document. The alt attribute is used to display a string of text when the image can not be displayed (e.g., in non-graphical browsers). Note that it is a good idea to fill in the alt attribute so that users with non-graphical browsers can gain information. For example, when the image conveys information not explained in the text or the image is used in an anchor.
Start tagRequired <IMG>
Attributes
NameTypeDefaultComment
align( top | middle | bottom | left | right )#IMPLIEDvertical or horizontal alignment
alt CDATA #REQUIREDtext; short description
border CDATA #IMPLIEDinteger representing length in pixels; link border width
class CDATA #IMPLIEDspace-separated list of classes
dir( ltr | rtl )#IMPLIEDdirection for weak/neutral text
height CDATA #IMPLIEDnn for pixels or nn% for percentage length; override height
hspace CDATA #IMPLIEDinteger representing length in pixels; horizontal gutter
idID#IMPLIEDdocument-wide unique id
ismap( ismap )#IMPLIEDuse server-side image map
lang NAME #IMPLIEDlanguage code as RFC1766
longdesc CDATA #IMPLIEDUniform Resource Identifier as per RFC2396; a Uniform Resource Locator (URL) is a URI; link to long description (complements alt)
name CDATA #IMPLIEDname of image for scripting
onclick CDATA #IMPLIEDscript expression; a pointer button was clicked
ondblclick CDATA #IMPLIEDscript expression; a pointer button was double clicked
onkeydown CDATA #IMPLIEDscript expression; a key was pressed down
onkeypress CDATA #IMPLIEDscript expression; a key was pressed and released
onkeyup CDATA #IMPLIEDscript expression; a key was released
onmousedown CDATA #IMPLIEDscript expression; a pointer button was pressed down
onmousemove CDATA #IMPLIEDscript expression; a pointer was moved within
onmouseout CDATA #IMPLIEDscript expression; a pointer was moved away
onmouseover CDATA #IMPLIEDscript expression; a pointer was moved onto
onmouseup CDATA #IMPLIEDscript expression; a pointer button was released
src CDATA #REQUIREDUniform Resource Identifier as per RFC2396; a Uniform Resource Locator (URL) is a URI; URI of image to embed
style CDATA #IMPLIEDstyle sheet data; associated style info
title CDATA #IMPLIEDtext; advisory title
usemap CDATA #IMPLIEDUniform Resource Identifier as per RFC2396; a Uniform Resource Locator (URL) is a URI; use client-side image map
vspace CDATA #IMPLIEDinteger representing length in pixels; vertical gutter
width CDATA #IMPLIEDnn for pixels or nn% for percentage length; override width
ContentEMPTY
End tagForbidden
Referenced in A ABBR ACRONYM ADDRESS APPLET B BDO BIG BLOCKQUOTE BODY BUTTON CAPTION CENTER CITE CODE DD DEL DFN DIV DT EM FIELDSET FONT FORM H1 H2 H3 H4 H5 H6 I INS KBD LABEL LEGEND LI NOSCRIPT OBJECT P PRE Q S SAMP SMALL SPAN STRIKE STRONG SUB SUP TD TH TT U VAR
Example
SourceAppearance
<P>
<IMG Src="http://www.december.com/html/images/icon.gif" alt="logo for the HTML Station"> Visit us today!
<P>
<IMG Src="http://www.december.com/html/images/icon.gif" alt="logo for the HTML Station" width="100" height="200" Align="center"> Meeting your hypertext needs since 1996.
<P>
<MAP Name="mymap">
<AREA Shape="rect" Coords="0,0,100,50" Href="http://www.december.com/html/" Alt="The HTML Station">
</MAP>
<IMG Src="../../images/icon.gif" Usemap="#mymap" Width="100" Height="100" Ismap Alt="imagemap">

logo for the HTML Station Visit us today!

logo for the HTML Station Meeting your hypertext needs since 1996.

The HTML Station imagemap

Save this page to any social bookmarking site! Share · Search · Market · Directory
2015-11-01 · John December · Contact · Terms of Use © December Communications, Inc.