| Home > Graphics, Alt & Title Attributes
< Previous PageGraphics, Alt & Title Attributes
Resource
ALT Attribute
The Alt attribute of the <img> HTML tag specifies text (alternative information) that will display if the image itself cannot be displayed due to slow Internet connection, error in the src (source) attribute, or use of a screen reader. Therefore, we should always include an Alt attribute in the <img> HTML tag, written as ALT="alternative text".
Older versions of Internet Explorer display this 'alt' text when mousing over the image, but this is NOT correct behavior according to the HTML specification for the Alt attribute.
TITLE Attribute
The Title attribute of the <img> HTML tag displays text when mousing over an image. Therefore, we should always also include a Title attribute in the <img> HTML tag, written as TITLE="alternative text". Use the same text as used for the ALT attribute.
Image below has ALT="Text if image does not display" attribute in the Image tag.
When hoovering over this image with older versions of I.E., "Text if image does not display" may be displayed. In Firefox NO text will be displayed.
Image below has TITLE="Name for graghic - additional information" in the Image tag.
When hoovering over it in I.E. or Firefox the "Name for graghic - additional information" text is displayed.
Image below has both ALT and Title attributes in Image tag: ALT="Text if image does not display". TITLE="Name for graghic - additional information"
When hoovering over it in I.E. or Firefox the "Name for graghic - additional information" text is displayed.
|
| |