<a hreflang=""> HTML Attribute

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Attribute of
How To Use a (For Creating Hyperlinks) In HTML
What does <a hreflang=""> HTML Attribute do?
Specifies the language of the linked resource.

Code Example

<a href="https://es.wikipedia.org/wiki/Flamenco" hreflang="es">Flamenco</a>

Language or Language and Region

Use hreflang to specify the language using the relevant two-letter language code (ISO 639-1). You may also identify the country code, but this must come after the language code, and cannot be used by itself.

Language alone

Flamenco

Language and Country

Flamenco

Adam is a technical writer who specializes in developer documentation and tutorials.

Browser Support for hreflang

iefirefoxchromeedgesafariopera
AllAllAllAllAllAll