How to use the alt and the title attribute of the image

When the mouse pointer is put on the image of the web page, the explanation of the image might be displayed. This is because of displaying it by using the alt attribute and the title attribute of the image. However, it is likely not to be displayed in Firefox, Google Chrome, and Opera even if displayed in IE (Internet Explorer).

Even if the pop up of the alt attribute of the image is effective in IE, it is invalid in other browsers.

When the mouse pointer is put in the image when the alt attribute is set to the image, the explanation of the image is displayed in IE. However, it is not displayed in Firefox, Google Chrome, and Opera. It is because the purpose of this is to do operation that IE is special as follows, and other browsers are original operation.

Role of alt attribute (image)

The alt attribute is the one specifying it for an alternative text when the image, the form, and the applet cannot be displayed.

It becomes help of the display when the voice synthesizer for there is no graphic display terminal, and a browser of form non-correspondence is used, and it uses it because of the setting that doesn't display the image if an alternative text is specified and is very convenient.

The alt attribute is an original alternative text, and not the one to display the explanation of the image when the mouse pointer is put in the image.

Role of title attribute (image and link)

The title attribute offers advisory information on the element. The value of the title attribute is appropriately treated with the displayed terminal. When the mouse pointer is put in the image in a browser of the ocular system, the brief message is displayed. In the voice reading out software, information in the title is read out. Moreover, it can inform them of linked Websites information by setting the title attribute to the link (a tag).

Method of doing the same operation by IE and other browsers

The value of the title attribute is pop improved when there is both the alt attribute and title attributes in IE. Therefore, if both the alt attribute and the title attribute are specified, it usually becomes the same operation as other browsers.

<img alt ="ALT text">
<img title ="TITLE text">

However, so as not to pop improve with IE, it puts it as follows as title = ""Operation similar to other browsers is done if it does so.

<img alt ="ALT text">
<img title="">

The alt attribute of the image is an indispensable attribute in XHTML.

In the grammar of XHTML, the alt attribute is supposed always to be written. There seem to be a lot of people who are the customs of not writing the alt attribute. However, it is the one that makes a habit of to write the alt attribute without fail.