| Version | //IETF//DTD HTML 2.0 Strict//EN
|
|---|
| Element | IMG |
|---|
| Purpose | image; photo, icon, glyph, or illustration |
|---|
| Description | This 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 tag | Required <IMG>
|
|---|
| Attributes | | Name | Type | Default | Comment |
|---|
| ALIGN | ( top | middle | bottom ) | #IMPLIED | position relative to text | | ALT | CDATA | #IMPLIED | textual alternative | | ISMAP | ( ISMAP ) | #IMPLIED | each pixel can be a link | | SDAPREF | CDATA | #FIXED "<Fig>< ? SDATrans Img: #AttList>#AttVal ( Alt )</Fig>" | generated text prefix; in support of transformation to the International Committee for Accessible Document Design DTD for usable access to structured information by print-impaired individuals | | SRC | CDATA | #REQUIRED | address of image object
|
|
|---|
| Content | EMPTY
|
|---|
| End tag | Forbidden
|
|---|
| Referenced in | A ADDRESS B BLOCKQUOTE BODY CITE CODE DD DT EM FORM H1 H2 H3 H4 H5 H6 I KBD LI
P SAMP STRONG TT VAR
|
|---|
| Example | | Source | Appearance |
|---|
<IMG Src="http://www.december.com/html/images/icon.gif" alt="logo for the HTML Station" align="middle"> Visit us today!
<p>
<IMG Src="http://www.december.com/html/images/icon.gif" alt="logo for the HTML Station" align="bottom"> Meeting your hypertext needs since 1996.
| Visit us today!
Meeting your hypertext needs since 1996.
|
|
|---|