Besides Src, <IMG> tag has various other attributes, which are as follows:
Alt
Sometimes a browser does not display images. In that case, uou can provide the text that you want to display in place of the image. The Alt attribute lets you specify text as an alternate to the image.
Importance of Alternate text
If the browser is text-based, e.g. Lynx, and cannot display images, the Alt attribute can prove to be help.
The Alt attribute can display a phrase instead of the image. It can explain your image to the visually challenged for whom the browser is programmed to read aloud the alternate text instead of displaying the image.
Since images are often large files and sometimes take a long time to display (due to heavy traffic or unsupportive browser), the user may expect a description of the image. Many people set their browsers settings to not auto load the images. In that case, Alt attribute is used. The alternate text will give a description of the image.
Note
The value for the Alt attribute is a text string of up to 1024 characters, enclosed in quotation marks if you include spaces or other punctuation.
To add and define the source of an image on a web page, type:
<IMG Src="address or the path of the image file">
Align
You can align the images with the help of Alogn attribute. The Align attribute behaves differently with inline and floating images.
Aligning inline images
Inline images are placed in the middle of the line of text. We can align inline images in three different styles:
Align=Top: It will align the top of the image with the top edge of the tallest character in the current line of text. If there are no other images in the current line, the top of the image is aligned with the top of the text.
Align=Middle: It will align the middle of the image with the middle of the line of text.
Align=Bottom: This is the default behaviour in which the bottom of an image will align with the bottom of the line of text.
Note
Morzilla Firefox and Internet Explorer treat the middle image alignment value differently. Morzilla aligns the middle of the image with the baseline of the text, whereas Internet Explorer aligns the middle of the image with the middle of the tallest item in the current line.