asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Element Attributes > HREFLANG Attribute

HREFLANG Attribute | hreflang Property


Specifies the language of the linked document.

Syntax

Inline <element hreflang = sLanguage...>
Script object.hreflang = sLanguage ]

Possible Values

sLanguage String specifying a valid BCP 47 language tag.

The property is read/write with no default value.

Remarks

The hreflang attribute, if present, gives the language of the linked resource.

This attribute may only be used when the href attribute is specified.

It is purely advisory. User agents must not consider this attribute authoritative.

The value must be a valid BCP 47 language tag.

Upon fetching the resource, user agents must use only language information associated with the resource to determine its language, not metadata included in the link to the resource.

Example


Applies To

A, AREA, LINK

See Also

How HyperText Links Work



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note