Area Tag and Example Usage in Html | CodingSource

Area Tag and Example Usage in Html

We can create a map on an image with the <area> tag. The HTML area Tag is a tag that allows us to link to objects on an image or to the desired area. We can give a link to the picture we want.

HTML area Tag. The <area> tag defines an area inside the image map (imagemap is an image with clickable areas).

The <area> element is always placed inside a <map> tag.

<p>You can click on the sun or other planets.:</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.gif">

   <area shape="circle" coords="90,58,3" alt="Mercury" href="/merglobe.gif">

   <area shape="circle" coords="124,58,8" alt="Venus" href="venglobe.gif">

</map>

The <area> tag defines an area (region) to create an image map.

The <area> tag should always be inside the <map> tag.

A relationship is created between the usemap property of the <img> tag and the name properties of the <map> tag.

Html Codes Related Posts

Newer Post Load More Pages..