Version-//W3C//DTD HTML 4.01//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
alt CDATA #REQUIREDtext; short description
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
idID#IMPLIEDdocument-wide unique id
ismap( ismap )#IMPLIEDuse server-side image map
lang NAME #IMPLIEDlanguage code as RFC1766; language code
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
width CDATA #IMPLIEDnn for pixels or nn% for percentage length; override width
ContentEMPTY
End tagForbidden
Referenced in A ABBR ACRONYM ADDRESS B BDO BIG BUTTON CAPTION CITE CODE DD DEL DFN DIV DT EM FIELDSET H1 H2 H3 H4 H5 H6 I INS KBD LABEL LEGEND LI OBJECT P PRE Q SAMP SMALL SPAN STRONG SUB SUP TD TH TT 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"> 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 Search · star Market
2022-02-10 · johndecember.com · Terms © December Communications, Inc.