HTML <area> hreflang Attribute

The hreflang attribute on an <area> tag specifies the language and country region of the area link.

This value is purely advisory.



An hreflang attribute on 3 <area> elements.
These attributes specify links as pages in the US English language.

Computer Monitor Keyboard Mouse
<img src="/img/html/computer-map.png" 

<map name="computermap">
  <area hreflang="en-US" shape="rect" alt="Monitor" coords="253,142,16,2" 
        href="" target="_blank">
  <area hreflang="en-US" shape="rect" alt="Keyboard" coords="262,218,0,156" 
        href="" target="_blank">
  <area hreflang="en-US" shape="circle" alt="Mouse" coords="267,234,22" 
        href="" target="_blank">

Using hreflang

The hreflang attribute specifies the language and country region of the linked resource.

Its value is for advisory purposes only.

The first two characters in the hreflang value represents the language code, such as 'en'.

And the last two characters in the hreflang value represents the country code, such as 'US'.

For example, the hreflang value of 'en-GB' specifies the English language in Great Britain.

Note: The hreflang attribute requires that href has a value.


<area href="URL" hreflang="language-code-country-code" />



Value Description
language-code-country-code The first 2 characters represent the language code of the linked page.
The last two characters represent the country code (optional).

Browser support

Here is when hreflang support started for each browser:

1.0 Sep 2008
1.0 Sep 2002
1.0 Aug 1995
1.0 Jan 2006
1.0 Jan 2003

You may also like

 Back to <area>

Author: Jack Poorte
Published: Jun 20 2021
Last Reviewed: Sep 30 2023

Quick question: what's your favorite/least favorite part of Dofactory?