HTML hreflang attribute

hreflang attribute specifies the language used in the linked page.

Example

 <p>Language of the linked resource is English.</p>
 <a href="http://www.codingb.com" hreflang="en"> Go to coding site </a>
Try </>

The above example indicates that the language of the linked resource is English.

hreflang attribute value

The value of the language is the valid BCD language.

A browser should know only the language of the linked document and not the metadata.

Related Tags

<a> tag

It defines hyperlink of the external resources. hreflang attribute defines the language of the linked document.

See the above example to understand.

<area> tag

area tag specifies link on an area. hreflang is also applicable on the area tag.

<area href="URL" hreflang="ar" >

In the above example, the language of the linked resource is Arabic.

link tag links the current document to the external documents.

<link href="URL" hreflang="en" >

The language of the linked resource is English.



Was this article helpful?

 

Email:

Message:

Get the newsletter