The HTML5 <area> tag is used for adding details to specific areas within an image map. An image map is an image with different regions that can be clicked if seen on the browser.
The HTML5 <area> tag is supported by all major browsers like Internet Explorer, Google Chrome, Firefox, Safari and Opera.
Slight differences can be observed when <area> tag is used for HTML5 and HTML 4.01. It is because, HTML5 has incorporated new attributes which cancels out the other attributes that are used for HTML4.01. The attributes for HTML5 <area> tag is enumerated below. The new attributes that are used is HTML5 are also specified.
|
Attribute
|
Value
|
Description
|
|
alt
|
text
|
Specifies an
alternate text for the area. Required if the href attribute is present
|
|
coords
|
coordinates
|
Specifies the
coordinates of the area
|
|
href
|
URL
|
Specifies the
hyperlink target for the area
|
|
hreflang(NEW)
|
language_code
|
Specifies the
language of the target URL
|
|
media(NEW)
|
media query
|
Specifies what
media/device the target URL is optimized for
|
|
nohref
|
nohref
|
Not supported in HTML5
|
|
rel(NEW)
|
alternate
author
bookmark
help
license
next
nofollow
noreferrer
prefetch
prev
search
tag
|
Specifies the
relationship between the current document and the target URL
|
|
shape
|
default
rect
circle
poly
|
Specifies the shape
of the area
|
|
target
|
_blank
_parent
_self
_top
framename
|
Specifies where to
open the target URL
|
|
type(NEW)
|
MIME_type
|
Specifies the MIME
type of the target URL
|
The <area> tag is also capable of supporting the Global Attributes and Event Attributes in HTML5.