Forum Moderators: open
So if you have an image of BT, you could do this:
<img src="brett_tabke.gif" alt="Brett Tabke, inventor of the Bot Blog" ... />
..or if you have a linked banner:
<a href=" ... "><img src="webmasterworld.gif" alt="Webmasterworld, the largest webmaster forum on the net" ... /></a>
If I am using a image code and not using "alt" tag then search engine will be able to crawl that code or I have to put the alt tag in the image link code?
It is actually referred to as the alt attribute and is required if you are going to validate your html.
The alt attribute should describe the content of the image it is attached to period. It is not a place to stuff keywords unless of course the image you are describing is best described with those keywords.
Note: IE's behavior of showing the alt attribute on mouse hover is incorrect. Surf your site with a standards compliant browser like Firefox (or Mozilla based) and you will see that the alt attributes are not displayed on hover. If you see anything display on hover in Firefox, it is most likely a title attribute and not an alt attribute.
Keep in mind that the alt attribute is designed to display when a user has their images turned off which are quite a few these days. Imagine what a keyword stuffed alt attribute looks like to them. You've got all this great content sitting there and then an image placeholder that is stuffed with keyword phrases that really don't make sense, I see it day in and day out.
If the image is a picture of a widget, then you would do something like this...
<... alt="Picture of Widget"> The W3C recommends no more than 80 characters for the alt attribute. If more are needed then you should use the longdesc.
If you are using spacer images, an empty alt attribute is in order to pass validation...
<... alt=""> That is two quote marks side by side with no space between them.
Hi,
Is it ok to use both alt *and* title tags on images at all please?
Dexie