Link hreflang attribute

Definition and Usage

hreflang Set or return the language code of the linked document attribute.

The hreflang attribute will not be displayed as any special content in any mainstream browser. However, it can be used by search engines or scripts.

Tip:To view all available language codes, please visit ourLanguage Code Reference Manual

See also:

HTML Reference Manual:HTML <link> hreflang 属性

HTML Reference Manual:HTML <link> تگ

Example

Example 1

Return the language code of the linked document:

var x = document.getElementById("myLink").hreflang;

Try it yourself

Example 2

Change the language code of the linked document:

document.getElementById("myLink").hreflang = "en-us";

Try it yourself

Syntax

Return hreflang attribute:

linkObject.hreflang

set hreflang attribute:

linkObject.hreflang = languagecode

ویژگی کا مقدار

مقصد کچھ کا معنی
languagecode منسلک کردہ دستاویز کی زبان کو کا تابع کی جانے والی زبان کا کوڈ مقرر کرتا ہے。

تکنیکی تفصیلات

بازگشتی قیمت: لینگویج کو کا تابع کی جانے والی زبان کا کوڈ، جو منسلک کردہ دستاویز کا ہوتا ہے。

بrowser سپورٹ

کروم ایج فائرفاکس سافری آپریا
کروم ایج فائرفاکس سافری آپریا
محدودیت محدودیت محدودیت محدودیت محدودیت