HTML <area> hreflang Attribute
Last Updated :
12 Mar, 2024
HTML <area> hreflang attribute is used to specify the language of the target URL in the given area. It is used only when the href attribute is set.
Syntax:Â
<area hreflang="language_code">
Attribute Values:
Value
| Description
|
---|
language_code
| which is the two-letter language code and used to specify the language of the linked document.Â
|
---|
Note: The <area> hreflang attribute depreciated from HTML 5.
HTML <area> hreflang attribute Examples
Example:Â In this example the HTML <area> element defines clickable areas on an image map. The hreflang attribute specifies the language of linked resources.
HTML<!DOCTYPE html>
<html>
<head>
<title>
HTML area hreflang Attribute
</title>
</head>
<body style="text-align:center;">
<img src=
"https://media.geeksforgeeks.org/wp-content/uploads/20190227165729/area11.png"
alt="alt_attribute"
width="300"
height="119"
class="aligncenter"
usemap="#shapemap" />
<map name="shapemap">
<!-- area tag contained image. -->
<area shape="poly"
coords="59, 31, 28, 83, 91, 83"
href=
"https://media.geeksforgeeks.org/wp-content/uploads/20190227165802/area2.png"
alt="Triangle"
hreflang="en">
<area shape="circle"
coords="155, 56, 26"
href=
"https://media.geeksforgeeks.org/wp-content/uploads/20190227165934/area3.png"
alt="Circle"
hreflang="en">
<area shape="rect"
coords="224, 30, 276, 82"
href=
"https://media.geeksforgeeks.org/wp-content/uploads/20190227170021/area4.png"
alt="Square"
hreflang="en">
</map>
</body>
</html>
Output:Â
Supported Browsers
The browser supported by <area> hreflang attribute are listed below:Â
Share your thoughts in the comments
Please Login to comment...