<!DOCTYPE html>
<html>
<body>

<img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap">

<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
  <area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
  <area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>

<p>
  <a id="myLink" href="../html/default.html">HTML</a><br>
  <a href="../css/default.html">CSS</a>
</p>

<p>Click the button to display the URL of the element with id="myLink".</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.links.namedItem("myLink").href;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>