Quick Answer
What are HTML language codes?
The HTML lang attribute uses BCP 47 language tags, including simple tags such as en and more specific tags such as en-GB. This page’s table lists a selection of two-letter ISO 639-1 codes, rather than every valid language tag.
HTML Language Codes Reference
Declare the content language with a BCP 47 tag in lang. Correct language metadata helps assistive technology choose pronunciation and browsers apply text conventions. The table below covers selected two-letter codes.
Declaring the correct language is crucial for international websites and accessibility compliance. Screen readers use language information to apply appropriate pronunciation rules, while search engines use it to serve content to users in their preferred language. Always specify the lang attribute on the html element to declare the primary language of your page.
You can also use the lang attribute on individual elements to mark content in different languages within the same page. For example, if your English page includes a French quote, wrap it in a span or div with lang="fr". This helps assistive technologies switch to the appropriate language pronunciation and maintains proper document semantics.
Usage Example
The lang attribute is used to specify the language of the element's content. It helps search engines and browsers understand the language of your content.
<p lang="fr">Bonjour</p>
Major World Languages
| Code | Language |
|---|---|
| en | English |
| zh | Chinese |
| es | Spanish |
| hi | Hindi |
| ar | Arabic |
| bn | Bengali |
| pt | Portuguese |
| ru | Russian |
| ja | Japanese |
| de | German |
| fr | French |
| ko | Korean |
| it | Italian |
| tr | Turkish |
| vi | Vietnamese |
European Languages
| Code | Language |
|---|---|
| cs | Czech |
| da | Danish |
| nl | Dutch |
| fi | Finnish |
| el | Greek |
| hu | Hungarian |
| ga | Irish |
| no | Norwegian |
| pl | Polish |
| ro | Romanian |
| sv | Swedish |
| uk | Ukrainian |
Asian Languages
| Code | Language |
|---|---|
| th | Thai |
| id | Indonesian |
| ms | Malay |
| tl | Tagalog |
| ur | Urdu |
| fa | Persian |
| he | Hebrew |
| ta | Tamil |
| te | Telugu |
| mr | Marathi |
Other Languages
| Code | Language |
|---|---|
| af | Afrikaans |
| sq | Albanian |
| am | Amharic |
| hy | Armenian |
| eu | Basque |
| be | Belarusian |
| bs | Bosnian |
| bg | Bulgarian |
| ca | Catalan |
| hr | Croatian |
| eo | Esperanto |
| et | Estonian |
| is | Icelandic |
| la | Latin |
| lv | Latvian |
| lt | Lithuanian |
| mk | Macedonian |
| mt | Maltese |
| mn | Mongolian |
| sr | Serbian |
| sk | Slovak |
| sl | Slovenian |
| sw | Swahili |
| cy | Welsh |
| yi | Yiddish |