HTML a hreflang Attribute
HTML <a> tag
Example
The hreflang attribute specifies the language of the document in the link:
<a href="http://www.w3schools.com"
hreflang="en">W3Schools</a>
|
Try it yourself!
|
Definition and Usage
The hreflang attribute specifies the language of the document in the target URL.
Syntax
<a hreflang="language_code">
|
Syntax Example
Attribute Values
Value |
Description |
language_code |
A two-letter language code that specifies the language of the document in the target URL.
To view all available language codes, go to our
Language code reference.
|
Browser Support

The major browsers do not use the hreflang attribute in any way.
HTML <a> tag
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|