HTML area tag

HTML area tag is used to specify links to each image parts.

After specifying the link to each area of image, you can hover and click the links to open them.


Output

html area tag nature image

paragraphimagefigure

HTML area tag attributes

Sr. No.atribute NameDescription
1altalt tag is used to display alternate text for the area.
2coordscoords id used to specify the co-ordinates of the area to describe the href link. This becomes to clickable area to show internal or external pages.

  • for shape=”rect”, coords= “left, top, right, bottom” coords value are the numeric values.
  • for shape=”circle”, coords= “center-x, center-y, radius” coords value are the numeric values.
  • for shape=”poly”, coords= “x1, y1, x2, y2, …xn,yn” coords value are the numeric values.
3downloadUsed to describe the file to dowload on click. The value of this attribute is the name of a file with its location.
4hrefhref is used to specify the location of the source or location to display on click.
5hreflanghreflang is used to specify the language of the source.
6mediamedia is used to specify the media or target device the target url is optimized for.
7relrel is used to specify the relationship between the current location and the target location. The values for rel attribute are
alternate
author
bookmark
help
license
next
nofollow
noreferrer
prefetch
prev
search
tag
8shapeshape is used to specify the shape of the image map. The values for this attribute are rect, rectangle, circ, circle, poly, polygon

Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.