The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's HTML Tag Reference

| Index | Previous Tag: <ILAYER> | Next Tag: <INPUT> (BUTTON) |


<IMG>

Inserts an image in the page.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later
Attributes:
ALIGN = "Text"
The alignment of text that follows the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

Notes:

  • Possible values: LEFT, RIGHT, TOP, TEXTTOP, MIDDLE, TEXTMIDDLE, BASELINE, BOTTOM, TEXTBOTTOM.
  • This attribute is deprecated.

ALT = "Text" (Required)
Text to display for browsers that don't support (or are configured not to display) images.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

Notes:

  • Most modern browsers also use the ALT text to display a banner above the image when the user hovers their mouse over the image.

BORDER = Postive integer
The thickness of the border that surrounds the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.2 and later 1.0 and later 1.0 and later

Notes:

  • If you're using the image as a link, set BORDER=0 to hide the link border that normally appears.
  • This attribute is deprecated.

CLASS = "Text"
The style sheet class used by the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • You can specify two or more classes; be sure to separate each class name with a space.

CONTROLS
Determines whether the browser displays a set of controls that enable the user to control playback of a video.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 2.0 and later Not supported

Notes:

  • To specify that the image is a video, use the DYNSRC attribute.

DYNSRC = "Text"
The URL of a video file.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 2.0 and later Not supported

HEIGHT = Positive integer
The image's height, in pixels.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.0 and later 1.0 and later 1.0 and later

Notes:

  • Specifying the HEIGHT and WIDTH will make your pages load faster since the browser doesn't have to waste time calculating the image dimensions.

HSPACE = Positive integer
The horizontal space, in pixels, that is added to the left and right sides of the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.2 and later 1.0 and later 1.0 and later

ID = "Text"
An alphanumeric string that uniquely identifies the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • Although you can use letters and numbers for the ID, the first character must be a letter.

ISMAP
Identifies the image as an image map.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

LANG = "Text"
The language used by the tag's attribute values and text content.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

LONGDESC = "Text"
The URL of a page that has a long description of the frame's contents.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later Not supported Not supported

LOWSRC = "Text"
The URL of a low-resolution version of the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 4.0 and later 1.0 and later

Notes:

  • The browser displays the low-resolution version (which should display quite quickly) first, and then displays the regular image.

NAME = "Text"
The name of the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 4.0 and later 3.0 and later

Notes:

  • The NAME attribute enables scripts to work with this image.

SRC = "Text" (Required)
The URL of the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

Notes:

  • Use either just a file name (if the image file is in the same directory as the page), a relative name (if the image file is in another directory), or a full URL.

START = "Text"
Determines when a video begins playing.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 2.0 and later Not supported

Notes:

  • Use either FILEOPEN (the video begins as soon as the page loads) or MOUSEOVER (the video begins when the user places the mouse over the video).

STYLE = "Text"
The style or styles to use with the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • If you enter multiple style properties, separate each one with a semi-colon (;).

SUPPRESS = "True/False"
Determines whether the browser displays only an image placeholder instead of the actual image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported Not supported 4.0 and later

Notes:

  • If you set this attribute to TRUE, the browser displays the ALT text in the placeholder.

USEMAP = "Text"
The image map coordinates (as specified by a <MAP> tag) to use with the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.2 and later 1.0 and later 2.0 and later

Notes:

  • The value of this attribute is the name of the image map (given by the <MAP> tag's NAME attribute), preceded by a number sign (#).

VRML = "Text"
The URL of an inline VRML world.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 2.0 and later Not supported

VSPACE = Positive integer
The vertical space, in pixels, that is added to the top and bottom of the image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.2 and later 1.0 and later 1.0 and later

Notes:

WIDTH = Positive integer
The image's width, in pixels.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported Not supported Not supported

Notes:

  • Specifying the HEIGHT and WIDTH will make your pages load faster since the browser doesn't have to waste time calculating the image dimensions.

Example:
<IMG SRC="cigwin98.jpg" HEIGHT=187 WIDTH=150 ALIGN="LEFT">
This book shows you that there are ways to tame the 
Windows beast. With "just the facts ma'am" explanations, 
simple step-by-step instructions, and lots of useful examples, 
you'll see that getting your Windows work done doesn't have 
to cost you your sanity. The book uses a casual, lighthearted 
approach that proves that "Windows" and "fun" are not 
mutually exclusive concepts (as hard as that may be to believe).

How It Looks:
This book shows you that there are ways to tame the Windows beast. With "just the facts ma'am" explanations, simple step-by-step instructions, and lots of useful examples, you'll see that getting your Windows work done doesn't have to cost you your sanity. The book uses a casual, lighthearted approach that proves that "Windows" and "fun" are not mutually exclusive concepts (as hard as that may be to believe).

| Index | Previous Tag: <ILAYER> | Next Tag: <INPUT> (BUTTON) |