HTML | <a> hreflang Attribute Last Updated : 12 Jul, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The HTML hreflang Attribute is used to specify the language for a linked document. It is used only when the href attribute is set. Syntax: <a hreflang="language_code"> Attribute Values: language_code: It specify the language code of the Linked Document. Example: html <!DOCTYPE html> <html> <head> <title> HTML hreflang Attribute </title> </head> <body> <center> <h1> GeeksForGeeks </h1> <h2> HTML <a> hreflang Attribute </h2> <p>Welcome to <a href="http://www.example.com:4097/test.htm#part2" id="GFG" rel="nofollow" hreflang="en-us" target="_self"> GeeksforGeeks </a> </p> </center> </body> </html> Output: Supported Browsers: The browsers supported by HTML <a> hreflang Attribute are listed below: Google Chrome Internet Explorer Firefox Apple Safari Opera Comment More infoAdvertise with us Next Article HTML | <a> hreflang Attribute M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Attributes Similar Reads HTML <area> hreflang Attribute HTML <area> hreflang attribute is used to specify the language of the target URL in the given area. It is used only when the href attribute is set. Syntax:Â <area hreflang="language_code">Attribute Values: Value Description language_code which is the two-letter language code and used to 1 min read HTML <a> href Attribute The HTML <a> href attribute is used to specify the URL of the page that the link points to. When the href attribute is not present in the <a> element, it will not function as a hyperlink. This attribute is essential for creating links to any address and is used in conjunction with the 1 min read HTML <link> hreflang Attribute HTML <link> hreflang attribute specifies the language of the linked resource. It helps search engines understand the language targeting of a document. Without the href attribute, there is no use of this attribute in the link element. HTML link hreflang Attribute Syntax:<link hreflang="langa 2 min read HTML hreflang Attribute HTML hreflang Attribute is used to specify the language for a linked document. It is used only when the href attribute is set. Syntax: <element hreflang="language_code"> Attribute Value:The hreflang attribute contains a single value language_code which is the two-letter language code and used 2 min read HTML <base> href Attribute HTML <base> href Attribute specifies the base URL for all relative URLs in a document, serving as the reference point for resolving relative links and resources. Syntax:Â <base href="URL">Attribute Values: It contains the value i.e URL which specifies the absolute URL that defines the ba 1 min read Like