HTML Value Syntax

HTML language tag syntax

A BCP 47 language tag identifies language and optional script, region or other subtags; examples include en, fa and zh-Hant. lang informs pronunciation and language-sensitive processing, not text direction. An empty lang denotes unknown language. This is a value grammar, not a standalone HTML element.

Formal Syntax & Structure

html syntaxhtml
lang="fa"

Working Example

Example Snippethtml
<p lang="en">Hello</p><p lang="fa" dir="rtl">سلام</p>
HTML Reference