HTML CSS examples for HTML Tag:area
The alt attribute provides alternative information for user if user cannot view the image.
To create a tooltip for an image, use the title attribute!
Value | Description |
---|---|
text | Specifies the alternate text for the area, if the image cannot be displayed |
The following code shows how to create An image-map, with clickable areas:
<!DOCTYPE html> <html> <body> <img src="https://www.java2s.com/style/demo/Opera.png" width="145" height="126" alt="message" usemap="#planetmap"> <map name="planetmap"> <area shape="rect" coords="0,0,80,100" alt="A" href=""> <area shape="circle" coords="90,60,5" alt="B" href=""> <area shape="circle" coords="130,60,10" alt="C" href=""> </map><!--from ww w . j a v a 2 s .c om--> </body> </html>