Wednesday, March 19, 2008

Creating Image as link and Alt Attribute


To create image as link,the basic html code is <img> <img src="url"> where url is url of your image.



Using ALT attribute in image codes:

The alt attribute will be helpul for when browser's can't display/load images.If the browser is unable to download pictures it will search for alt attributes and display the alternate text instead of missing image.
The alt attribute is used to define an "alternate text" for an image. You can specify any name to the picture.The code looks like:
<img src="image.gif" alt="My image">

For example My Image.If you move your cursor over the image it will display as My Image,which is given in alt attribute.

If the browser can't display the image it will display as My image.

0 comments: