Area tag in html

The <area> tag defines an area inside an image-map (an image-map is an image with clickable areas).
The <area> element is always nested inside a <map> tag.
The usemap attribute in the <img> tag is associated with the <map> element's name attribute, and creates a relationship between the image and the map.



<!DOCTYPE html>
<html>
<body>

<p>Click on the sun or on one of the planets to watch it closer:</p>

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

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

</body>
</html>

Output:
Click on the sun or on one of the planets to watch it closer:
Planets

Comments

Popular posts from this blog

Headings In HTML

Introduction and Format of HTML

Font Tag