In this tutorial, we will see the use of hreflang attribute
and how to implement. Hreflang gives the language of linked
document. This attribute can be used when href attribute is available.
| Attribute | Value | Description |
|---|---|---|
| hreflang | language_code (ISO code) | Define the language of linked document. It is two latter ISO code of language. |
Declaration syntax of hreflang attribute in anchor tag.
| <a hreflang="language code">Text Area</a> |
hrefLangAttribute.html
<!DOCTYPE html>
|
Note: See the browser compatible page for successfully rendering the program.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.