Skip to content

Instantly share code, notes, and snippets.

@marta-krzyk-dev
Last active January 22, 2019 08:47
Show Gist options
  • Save marta-krzyk-dev/07e5ca4a95e5cac85d9d258b62a2b7ac to your computer and use it in GitHub Desktop.
Save marta-krzyk-dev/07e5ca4a95e5cac85d9d258b62a2b7ac to your computer and use it in GitHub Desktop.
Clickable area of image inside email
<!--This solution doesn't work with Gmail, worked in Thunderbird.-->
<img src="http://yoursite.eu/image.jpg" usemap="#image-map">
<map name="image-map">
<area target="_blank" href="http://yoursite.eu/check_this_link_out" coords="184,839,435,879" shape="rect">
</map>
<!--SOLUTION 2-->
<!--This solution doesn't work with Gmail, worked in Thunderbird.-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
<map name="mapname">
<area alt="alttext" coords="183,837,435,877" shape="rect" href="http://yoursite.eu/check_this_link_out"/>
</map>
<img src="http://www.yoursite.eu/image.jpg" alt="alttext" usemap="#mapname" width="620" height="1026" />
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment