What texts does the robot use for image search?

Text in the alt attribute of the img tag

The alt attribute is an alternative source of information for users who have disabled images in their browser. If the alt attribute is specified, the attribute text is displayed when it's not possible to display the image:

If the alt attribute is not specified, the image is empty:

It's especially important to describe the image by specifying the alt attribute for sites whose content consists predominantly of images.

This is what an alt attribute may look like:

<img border="0" alt="[alternative text]" src=​"risunok.jpg"
width="[image width]" height="[image height]">

You don't need to put all the site's or page's keywords in the alt attribute, only the ones that describe the image. This helps the robot find the most appropriate image, and makes it easier for Yandex users to find it in search results and get to your site. It is not advised to leave the alt attribute empty.

If you add several similar images (for example, photos of a product from an online store), you should set unique alt attributes for them (e.g., front view, back view).

Text in the title attribute of the img tag

The title attribute gives additional information about the image. The text of this attribute appears when you hover your mouse over the image:

This is what the title attribute may look like:

<img border="0" alt="[alternative text]" title="[tip text]"
src=​"risunok.jpg" width="[image width]" height="[image height]">

If the image is a link, then it's best to put the title attribute in the link element:

<a href="link.html" title="[tip text]"><img border="0" alt="[alternative text]"
src=​"risunok.jpg" width="[image width]" height="[image height]"></a>

For each image, you should specify a unique title. It is not advised to leave the title attribute empty.

Other texts

In addition to the alt and title attribute values, image search uses the following texts:

  • The texts of links to images published on other pages and sites.

  • The text on the webpage that is located in close proximity to the image.

  • Texts and headers of short documents that surround a single image.

  • Names of files and image scripts (including their transliterations and simplified word-for-word translation).

However, the alt and title attributes are the most universal ones, hence they should always be specified.