HTML <link> hreflang Attribute

❮ HTML <link> tag

Example

<head>
  <link href="link.html" rel="parent" hreflang="en">
</head>

Meaning

The hreflang attribute is used to specifies the language of the linked resource.

It is purely advisory. Allowed values are determined by BCP47. Use this attribute only if the hrefhref attribute is present.


Standard Syntax

HTML: <link hreflang="languageCode">

XHTML: <link  hreflang="languageCode"/>



Browser Support




Status







Attribute Values

Value Description
languageCode Specifies language code that the language of the linked document.
❮ HTML <link> tag