Property Description 4 5 alt defines the alternate text for this area. This property is required if the href exists. Used only if the href attribute exists. 4 5 coords defines the coordinates of the clickable region. 4 5 href Defines the destination URL for this area. 4 5 Hreflang The base language of the target URL. Used only if the href attribute exists. 4 5 nohref disapprove. Excludes an area from an image map. 4 media types that specify the target URL. Default value: All. Used only if the href attribute exists. 5 Ping a space-delimited list of URLs that are notified when the user clicks on the link. Used only if the href attribute exists. 5 rel Specify the relationship between the current document and the target URL. Used only if the href attribute exists. 5 shape of the specified area. 4 5 target opens the destination URL. 4 5 Type Sets the MIME type of the destination URL. Used only if the href attribute exists. 5
For a complete description, please visit the event properties in HTML 5.
Tiy
Create an image map with the following code:
<html> <body> <p> Click on the stars on the image to enlarge them. </p> <img Src= "/i/eg_planets.jpg" Border= "0" usemap= "#planetmap" alt= "Planets"/> <map name= "Planetmap" id= "Planetmap" > <area Shape= "Circle" Coords= "180,139,14" href = "/example/html/venus.html" target = "_blank" alt= "Venus"/> <area Shape= "Circle" Coords= "129,161,10" href = "/example/html/mercur.html" target = "_blank" alt= "Mercury"/> <area Shape= "Rect" Coords= "0,0,110,260" href = "/example/html/sun.html" target = "_blank" alt= "Sun"/> </map> <p><b> Note: the "Usemap" attribute in the </b>img element refers to the "id" or "name" attribute in the map element (based on the bangs So we also added the ID and name attributes to the map element. </p> </body> </html>
This example shows how to create an image map with a clickable area. Each of these areas is a hyperlink.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.