ສັນຍາວັດ HTML <link> hreflang Attribute

Definition and Usage

hreflang Attribute specifies the language of the text in the linked document.

only when href attribute Use this attribute only when

ເວລາໃຫ້ເຫັນ:This attribute is purely advisory.

Example

In this case, the hreflang attribute indicates that the linked document is in Chinese:

<link href="tag_link.asp" rel="parent" rev="subsection" hreflang="zh">

Try it yourself

Syntax

<link hreflang="langauge_code">

Attribute Value

Value Description
language_code

Language codes consisting of two letters, specifying the language used in the linked document.

ສຳລັບເບິ່ງທັງໝົດປະສັບອັນດັບປະເພດ, ຍ້າຍໄປທີ່Language Code Reference Manual.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
ສະໜັບສະໜູນ ສະໜັບສະໜູນ ສະໜັບສະໜູນ ສະໜັບສະໜູນ ສະໜັບສະໜູນ

ເວລາໃຫ້ເຫັນ:hreflang ປະສັບຂອງປະເພດຈະບໍ່ຖືກສະແດງໃນບັນດາບາດຫົວພາບຈາກບັນດາສາຍພາບ. ແຕ່ມັນສາມາດຖືກໃຊ້ໂດຍການຄົ້ນຫາຫົວພາບຫຼືສັບສິນ.