Area hreflang Property
Example
Return the language code for a specific area in an image-map:
var x =
document.getElementById("venus").hreflang;
Try it Yourself »
Definition and Usage
The hreflang property sets or returns the value of the hreflang attribute of a link.
The hreflang attribute specifies the language of the target URL in the area.
Tip: To view all available language codes, go to our Language code reference.
Browser Support
| Property | |||||
|---|---|---|---|---|---|
| hreflang | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the hreflang property:
areaObject.hreflang
Set the hreflang property:
areaObject.hreflang = languagecode
Property Values
| Value | Description |
|---|---|
| languagecode | Specifies a two-letter language code that specifies the language of the linked document |
Technical Details
| Return Value: | A String, representing the language of the linked document |
|---|
❮ Area Object

