The <img> is used to display graphics on a web page.
The following table lists the attributes associated with the <img> tag:
Attribute | Description |
src=url | The src attribute specifies the source of the image, where url is the url of the image; for example, src="myimage.gif" would place myimage.gif on the page. NOTE: This attribute is required. |
alt=text | A short label for the image. This should always be set. It will show on browsers that don't display images, for example. |
height=pixels | Sets the height of the image in pixels. The image will be scaled appropriately. |
width=pixels | Sets the width of the image in pixes. Again, the image will scale. |
border=pixels | Will place a border around the image the number of pixels specified wide. This attribute is deprecated, and one is encouraged to use styles instead. |
align=[left | right | top | middle | bottom] | Describes how to align the image with respect to the surrounding text.This attribute is deprecated, and one is encouraged to use styles instead. |
hspace=pixels | How much white space to include on the sides of the image in pixels. |
vspace=pixels | How much white space to include on the top and bottom of the image in pixels |
longdesc=url | Points to the url of a document containing a long description of the image. |
ismap | See <map> and <area> tags for details. |
usemap | See <map> and <area> tags for details. |