HOME BACK NEXT MENU

 Tag Description:

-==--==--==--==--==-

<IMG> Image

Definition: Through use of <IMG>, in-line graphics (small graphics or icons, usually) can be incorporated into an HTML document.

Standard Attributes: CLASS, ID, LANG, SRC, MD

Attributes:

WIDTH

WIDTH is the image's optional suggested width. It is given in pixels by default.

HEIGHT

HEIGHT is the image's optional suggested height. It is given in pixels by default.

UNITS

UNITS, which is an optional attribute, specifies what units are to be used for the height and width attributes. It is one of units=en (half the point size) or units=pixels (the default)

ALIGN

ALIGN can take values TOP or MIDDLE or BOTTOM. It thereby indicates which part of the graphic should be aligned with the baseline for the text line containing the IMG element.

ALIGN=LEFT will make the graphic float down and over into the current left margin, and any subsequent text will wrap around the graphic's right hand side. Similarly, ALIGN=RIGHT will make the graphic align with the right margin and wrap text around the left. It is advisable to use the FIG element rather than this feature to represent larger graphics.

ALT (Alternate text)

ALT is optional alternative text. It serves as an alternative to the graphics for those using text-only environments. Although the alt text may contain entities for special symbols or accented characters, it cannot contain any markup (although this is possible with the FIG element).

ISMAP

ISMAP is an attribute that identifies an image as an image map (an image map is a graphical map that allows users to navigate transparently between information sources). It is possible to use the IMG element as part of the label for a hypertext link (such as in an anchor element). By clicking on the image, the user sends the location clicked to a server designated by the hypertext link.

Context: <IMG> is legal within

<A>, <ABBREV>, <ACRONYM>, <ADDRESS>, <AU>, <B>, <BANNER>, <BIG>, <BODY>, <BODYTEXT>, <CAPTION>, <CITE>, <CODE>, <CREDIT>, <DD>, <DEL>, <DFN>, <DIV>, <DT>, <EM>, <FIGTEXT>, <FN>, <FORM>, <H1>, <H2>, <H3>, <H4>, <H5>, <H6>, <I>, <INS>, <KBD>, <LANG>, <LH>, <LI>, <NOTE>, <P>, <PERSON>, <Q>, <S>, <SAMP>, <SMALL>, <STRONG>, <SUB>, <SUP>, <TD>, <TH>, <TT>, <U>, <VAR>

The following markup can be used within <IMG>: None

Suggested style/usage: Close Tag: OPTIONAL

Examples: <IMG SRC="images/trans001.gif">

-==--==--==--==--==-
HOME BACK NEXT MENU

E-Mail: HTML for Dummies at html4dum@lanw.com
URL: http://www.lanw.com/html4dum/h4d2e/t0042.htm
Text - Copyright © 1995, 1996 Ed Tittel & Steve James.
For Dummies, the Dummies Man logo and Dummies Press are trademarks or registered trademarks of Wiley Publishing, Inc. Used with Permission.
Web Layout - Copyright © 1996, LANWrights
Revised -- May, 2002 [MCB]