HTML Attributes

HTML hreflang attribute

Advises the language of a linked resource; it does not translate content or force a browser to use that language. Applicable elements include: <a>, <link>. Check each element’s value rules. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it.

Formal Syntax & Structure

html syntaxhtml
hreflang="fa"

Parameters & Attributes

NameTypeDescription
hreflangBCP 47 language tagAdvises the language of a linked resource; it does not translate content or force a browser to use that language.

Working Example

Example Snippethtml
<a href="/fa/guide" hreflang="fa">Persian guide</a>
HTML Reference