HTML <a> Tag with 'hreflang' Attribute
<a href="http://www.htmlcodes.ws/" hreflang="en">HTML Codes</a>
How to Use the above Code
- Replace the value of the
href
attribute to be the URL of the resource you're linking to. - Replace the anchor text (
HTML Codes
) with the text you want the user to see (or other content such as an image). - Replace
en
with the language code for the target URL. If you're not sure which language code to use, see the official list of ISO 639.2 Language Codes.
About the hreflang
Attribute
The hreflang
attribute indicates the language code of the destination URL. Only to be used when the href
attribute is present.
This attribute is purely advisory.