How to specify the hyperlink target for the area of an image in HTML5 ? Improve Improve Like Article Like Save Share Report The href attribute is used to specify the hyperlink target for the area in HTML5. The area tag is not a hyperlink in itself. The <a> tag should always have an opening as well as a closing tag. The coords attribute is obsolete on an element. Instead, always use the area tag for the image map where coords attribute can be used within the area tag. The same should also be applied to shape attributes. The following example states it clearly. Syntax: <area href = "URL"> Example: In this example, we will use the href attribute. HTML <!DOCTYPE html> <html> <body style="text-align: center"> <h1 style="color: green">GeeksforGeeks</h1> <h2>Use of href attribute in area tag.</h2> <img src= "https://media.geeksforgeeks.org/wp-content/uploads/20190808143838/logsm.png" alt="Geeks_logo" usemap="#gfg" /> <map name="gfg"> <!-- You'll be able to go to the link only when clicked on top-left corner --> <area shape="rect" coords="0, 0, 50, 50" alt="gfg" href="https://www.geeksforgeeks.org" /> </map> </body> </html> Output: Last Updated : 05 Jun, 2023 Like Article Save Article Previous How to specify that the target will be downloaded when a user clicks on the hyperlink in HTML5 ? Next How to make a HTML link that forces refresh ? Share your thoughts in the comments Add Your Comment Please Login to comment...