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

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:

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.
page no:109
         
Home