We use cookies. More

Full List of HTML Language Codes

In HTML, you can specify the language of a website or a section on a web page as you wish depending on the language that is used in its content. In this post, we will make a full list of HTML language codes that are currently in use.

Advertisement

The language of a web page can be specified using the lang attribute in HTML, which is supported by all major web browsers. What it does is that it tells the browsers and search engine bots to treat the page's content in the specified language, which is a useful feature to have for websites with languages that use uncommon languages and characters.

Basically, the lang attribute is used with the <html> tag at the top of the page, like the following:

<html lang="en">

In the above example, the lang attribute uses the en language code for English.

TIP: If you are new to HTML, you may find our posts about how to edit HTML files and how to add attributes to HTML elements to be useful.

With the introduction of HTML5, the lang attribute can now be used with any HTML element; though, it will make sense to use it only on elements that have text content with a language that is different than the main language of the web page. For example, to declare a paragraph in Spanish:

<p lang="es">Hola Mundo!</p>

Note that the lang attribute will not translate the text into another language; it will simply tell the browser (and search engines) that the content of this paragraph is in Spanish, hence the browser will display/render it accordingly.

HTML ISO Language Codes List

The language codes that are used in HTML or in any other medium are defined by the Library of Congress's Codes for the Representation of Names of Languages standard, under the ISO 639-1 Codes section. The following table displays the full list of currently defined language codes that you can use in your HTML documents.

CodeLanguage
abAbkhazian
aaAfar
afAfrikaans
akAkan
sqAlbanian
amAmharic
arArabic
anAragonese
hyArmenian
asAssamese
avAvaric
aeAvestan
ayAymara
azAzerbaijani
bmBambara
baBashkir
euBasque
beBelarusian
bnBengali
bhBihari languages
biBislama
bsBosnian
brBreton
bgBulgarian
myBurmese
caCatalan
kmCentral Khmer
chChamorro
ceChechen
nyChichewa
zhChinese
cuChurch Slavic
cvChuvash
kwCornish
coCorsican
crCree
hrCroatian
csCzech
daDanish
dvDivehi
nlDutch; Flemish
dzDzongkha
enEnglish
eoEsperanto
etEstonian
eeEwe
foFaroese
fjFijian
fiFinnish
frFrench
ffFulah
gdGaelic
glGalician
lgGanda
kaGeorgian
deGerman
elGreek
gnGuarani
guGujarati
htHaitian
haHausa
heHebrew
hzHerero
hiHindi
hoHiri Motu
huHungarian
isIcelandic
ioIdo
igIgbo
idIndonesian
iaInterlingua
ieInterlingue
iuInuktitut
ikInupiaq
gaIrish
itItalian
jaJapanese
jvJavanese
klKalaallisut
knKannada
krKanuri
ksKashmiri
kkKazakh
kiKikuyu
rwKinyarwanda
kyKirghiz
kvKomi
kgKongo
koKorean
kjKuanyama
kuKurdish
loLao
laLatin
lvLatvian
liLimburgan
lnLingala
ltLithuanian
luLuba-Katanga
lbLuxembourgish
mkMacedonian
mgMalagasy
msMalay
mlMalayalam
mtMaltese
gvManx
miMaori
mrMarathi
mhMarshallese
mnMongolian
naNauru
nvNavajo
ndNdebele
nrNdebele
ngNdonga
neNepali
seNorthern Sami
noNorwegian
nbNorwegian Bokmål
nnNorwegian Nynorsk
ocOccitan
ojOjibwa
orOriya
omOromo
osOssetian
piPali
paPanjabi
faPersian
plPolish
ptPortuguese
psPushto
quQuechua
roRomanian
rmRomansh
rnRundi
ruRussian
smSamoan
sgSango
saSanskrit
scSardinian
srSerbian
snShona
iiSichuan Yi
sdSindhi
siSinhala
skSlovak
slSlovenian
soSomali
stSotho
esSpanish
suSundanese
swSwahili
ssSwati
svSwedish
tlTagalog
tyTahitian
tgTajik
taTamil
ttTatar
teTelugu
thThai
boTibetan
tiTigrinya
toTonga
tsTsonga
tnTswana
trTurkish
tkTurkmen
twTwi
ukUkrainian
urUrdu
ugUyghur
uzUzbek
veVenda
viVietnamese
voVolapük
waWalloon
cyWelsh
fyWestern Frisian
woWolof
xhXhosa
yiYiddish
yoYoruba
zaZhuang
zuZulu

The above are the language codes for the languages that are widely used by the nations in the world. There are many other languages that are still used by some minorities or groups of people around the world, but (probably) since they are not widely used, they are not represented with an ISO 639-1 language code. If the language you want to use on your website is not listed above, simply don't use the lang attribute.

Hopefully, your language is on the table above. Please share this post if you think it was useful to you.

Advertisement

Was this post helpful?

If you found this post to be helpful, please share it! Thank you :)

f t g+ in