HTML Language Code Guide

Language Code Image

The lang attribute is used in the <html> tag to identify the language of the content on a webpage. It can also be used in div, span or any other element to describe the language of a given section on a web page.

Note that in HTML 4.01, the lang attribute cannot be used with the following elements:

  • <applet>
  • <base>
  • <basefont>
  • <br>
  • <frame>
  • <frameset>
  • <hr>
  • <iframe>
  • <param>
  • <script>

According to the W3C recommendation you should declare the primary language for each webpage with the lang attribute inside the <html> tag like this <html lang="en"> (see the following table for more language ISO). If you have any content on the page that is in a different language from that declared in the html element, use language attributes on elements surrounding that content.

Language Codes

The language codes below are used inside the element for lang attribute.

Language Code Implement
Abkhazian AB <html lang="ab">
Afar AA <html lang="aa">
Afrikaans AF <html lang="af">
Albanian SQ <html lang="sq">
Amharic AM <html lang="am">
Arabic AR <html lang="ar">
Armenian HY <html lang="hy">
Assamese AS <html lang="as">
Aymara AY <html lang="ay">
Azerbaijani AZ <html lang="az">
Bashkir BA <html lang="ba">
Basque EU <html lang="eu">
Bengali, Bangla BN <html lang="bn">
Bhutani DZ <html lang="dz">
Bihari BH <html lang="bh">
Bislama BI <html lang="bi">
Breton BR <html lang="br">
Bulgarian BG <html lang="bg">
Burmese MY <html lang="my">
Byelorussian BE <html lang="be">
Cambodian KM <html lang="km">
Catalan CA <html lang="ca">
Chinese ZH <html lang="zh">
Chinese (Simplified) zh-Hans <html lang="zh-hans">
Chinese (Traditional) zh-Hant <html lang="zh-hant">
Corsican CO <html lang="co">
Croatian HR <html lang="hr">
Czech CS <html lang="cs">
Danish DA <html lang="da">
Dutch NL <html lang="nl">
English, American EN <html lang="en">
Esperanto EO <html lang="eo">
Estonian ET <html lang="et">
Faeroese FO <html lang="fo">
Fiji FJ <html lang="fj">
Finnish FI <html lang="fi">
French FR <html lang="fr">
Frisian FY <html lang="fy">
Gaelic (Scots Gaelic) GD <html lang="gd">
Galician GL <html lang="gl">
Georgian KA <html lang="ka">
German DE <html lang="de">
Greek EL <html lang="el">
Greenlandic KL <html lang="kl">
Guarani GN <html lang="gn">
Gujarati GU <html lang="gu">
Hausa HA <html lang="ha">
Hebrew IW <html lang="iw">
Hindi HI <html lang="hi">
Hungarian HU <html lang="hu">
Icelandic IS <html lang="is">
Indonesian IN <html lang="in">
Interlingua IA <html lang="ia">
Interlingue IE <html lang="ie">
Inupiak IK <html lang="ik">
Irish GA <html lang="ga">
Italian IT <html lang="it">
Japanese JA <html lang="ja">
Javanese JW <html lang="jw">
Kannada KN <html lang="kn">
Kashmiri KS <html lang="ks">
Kazakh KK <html lang="kk">
Kinyarwanda RW <html lang="rw">
Kirghiz KY <html lang="ky">
Kirundi RN <html lang="rn">
Korean KO <html lang="ko">
Kurdish KU <html lang="ku">
Laothian LO <html lang="lo">
Latin LA <html lang="la">
Latvian, Lettish LV <html lang="lv">
Lingala LN <html lang="ln">
Lithuanian LT <html lang="lt">
Macedonian MK <html lang="mk">
Malagasy MG <html lang="mg">
Malay MS <html lang="ms">
Malayalam ML <html lang="ml">
Maltese MT <html lang="mt">
Maori MI <html lang="mi">
Marathi MR <html lang="mr">
Moldavian MO <html lang="mo">
Mongolian MN <html lang="mn">
Nauru NA <html lang="na">
Nepali NE <html lang="ne">
Norwegian NO <html lang="no">
Occitan OC <html lang="oc">
Oriya OR <html lang="or">
Oromo, Afan OM <html lang="om">
Pashto, Pushto PS <html lang="ps">
Persian FA <html lang="fa">
Polish PL <html lang="pl">
Portuguese PT <html lang="pt">
Punjabi PA <html lang="pa">
Quechua QU <html lang="qu">
Rhaeto-Romance RM <html lang="rm">
Romanian RO <html lang="ro">
Russian RU <html lang="ru">
Samoan SM <html lang="sm">
Sangro SG <html lang="sg">
Sanskrit SA <html lang="sa">
Serbian SR <html lang="sr">
Serbo-Croatian SH <html lang="sh">
Sesotho ST <html lang="st">
Setswana TN <html lang="tn">
Shona SN <html lang="sn">
Sindhi SD <html lang="sd">
Singhalese SI <html lang="si">
Siswati SS <html lang="ss">
Slovak SK <html lang="sk">
Slovenian SL <html lang="sl">
Somali SO <html lang="so">
Spanish ES <html lang="es">
Sudanese SU <html lang="su">
Swahili SW <html lang="sw">
Swedish SV <html lang="sv">
Tagalog TL <html lang="tl">
Tajik TG <html lang="tg">
Tamil TA <html lang="ta">
Tatar TT <html lang="tt">
Tegulu TE <html lang="te">
Thai TH <html lang="th">
Tibetan BO <html lang="bo">
Tigrinya TI <html lang="ti">
Tonga TO <html lang="to">
Tsonga TS <html lang="ts">
Turkish TR <html lang="tr">
Turkmen TK <html lang="tk">
Twi TW <html lang="tw">
Ukrainian UK <html lang="uk">
Urdu UR <html lang="ur">
Uzbek UZ <html lang="uz">
Vietnamese VI <html lang="vi">
Volapuk VO <html lang="vo">
Welsh CY <html lang="cy">
Wolof WO <html lang="wo">
Xhosa XH <html lang="xh">
Yiddish JI <html lang="ji">
Yoruba YO <html lang="yo">
Zulu ZU <html lang="zu">