2. HTML Specification
<IMG>
Level 0
The Image element is used to incorporate in-line graphics (typically icons or small graphics) into an HTML document. This element cannot be used for embedding other HTML text.
HTML user agents that cannot render in-line images ignore the Image element unless it contains the ALT attribute. Note that some HTML user agents can render linked graphics but not in-line graphics. If a graphic is essential, you may want to create a link to it rather than to put it in-line. If the graphic is not essential, then the Image element is appropriate.
The Image element, which is empty (no closing tag), has these attributes:
- ALIGN
- The ALIGN attribute accepts the values TOP or MIDDLE or BOTTOM, which specifies if the following line of text is aligned with the top, middle, or bottom of the graphic.
- ALT
- Optional text as an alternative to the graphic for rendering in non-graphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents. Example of use:
<IMG SRC="triangle.gif" ALT="Warning:"> Be sure to read these instructions.
- ISMAP
- The ISMAP (is map) attribute identifies an image as an image map. Image maps are graphics in which certain regions are mapped to URLs. By clicking on different regions, different resources can be accessed from the same graphic. Example of use:
<A HREF="http://machine/htbin/imagemap/sample">
<IMG SRC="sample.gif" ISMAP>
</A>
- SRC
- The value of the SRC attribute is the URL of the document to be embedded; only images can be embedded, not HTML text. Its syntax is the same as that of the HREF attribute of the <A> tag. SRC is mandatory. Image elements are allowed within anchors.
- Example of use:
<IMG SRC ="triangle.gif">Be sure to read these instructions.
HTML 2.0 Specification (Internet Draft) - 29 NOV 94