<img/> Tag Attributes
Attributes of the <img/> tag
global attributes | In addition to the local attributes of the <img/> tag below, any of the common HTML attributes can also be coded. |
width ,height |
|
src |
a URI reference that resolves to the URL of a two-dimensional image resource Use percent escape codes as explained in the URL-encoding tutorial for any special characters in the URI reference. If the value of the
If the protocol scheme, username, host name/IP address and port number are omitted the default is the current host - the same server as the base of the current document. If the path starts with a slash |
alt |
Provides alternative content when images are blocked or disabled or for users who are unable to view the image. See Difference between image alt text and image title below. |
ismap="ismap" |
Sets the value of the <img ismap> boolean attribute to true . Omitting it sets to false . |
usemap |
a URI reference that resolves to the URL of an image map Use percent escape codes as explained in the URL-encoding tutorial for any special characters in the URI reference. |
Difference between image alt text and image title
The image alt text in the <img alt> attribute provides alternative content when images are blocked or disabled or for users who are unable to view the image.
The image title in the global title attribute provides a description of the image and may be displayed in a pop-up tool tip when the mouse is held over the image.