Language Declaration
HTML Character Sets - Part 5
Forward: In this part of my series, I talk about human language declaration.
By: Chrysanthus Date Published: 31 Jul 2012
Introduction
Note: If you cannot see the code or if you think anything is missing (broken link, image absent, etc.), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.
Description
You should declare, in a web page, the human language that the web page is using. That is, you should declare a human language that the user would read on the web page. Some HTML elements also allow you to declare the language of their contents. The default language for a page is English. Whether you are declaring a language for a whole page or just for an element, the attribute you have to use is, the lang attribute.
Assuming that all the user information (page content) on your web page is in French, then your web page code would be as follows:
<!DOCTYPE HTML>
<html lang="fr">
. . .
<html>
Note the lang attribute and its value in the start html tag. If the web page information were in German, then the start html tag would be
<html lang="de">
The following is the list of the lang attribute values for all the human important languages of the world:
Language | ISO Code |
---|---|
Abkhazian | ab |
Afar | aa |
Afrikaans | af |
Albanian | sq |
Amharic | am |
Arabic | ar |
Armenian | hy |
Assamese | as |
Aymara | ay |
Azerbaijani | az |
Bashkir | ba |
Basque | eu |
Bengali (Bangla) | bn |
Bhutani | dz |
Bihari | bh |
Bislama | bi |
Breton | br |
Bulgarian | bg |
Burmese | my |
Byelorussian (Belarusian) | be |
Cambodian | km |
Catalan | ca |
Cherokee | |
Chewa | |
Chinese (Simplified) | zh |
Chinese (Traditional) | zh |
Corsican | co |
Croatian | hr |
Czech | cs |
Danish | da |
Divehi | |
Dutch | nl |
Edo | |
English | en |
Esperanto | eo |
Estonian | et |
Faeroese | fo |
Farsi | fa |
Fiji | fj |
Finnish | fi |
Flemish | |
French | fr |
Frisian | fy |
Fulfulde | |
Galician | gl |
Gaelic (Scottish) | gd |
Gaelic (Manx) | gv |
Georgian | ka |
German | de |
Greek | el |
Greenlandic | kl |
Guarani | gn |
Gujarati | gu |
Hausa | ha |
Hawaiian | |
Hebrew | he, iw |
Hindi | hi |
Hungarian | hu |
Ibibio | |
Icelandic | is |
Igbo | |
Indonesian | id, in |
Interlingua | ia |
Interlingue | ie |
Inuktitut | iu |
Inupiak | ik |
Irish | ga |
Italian | it |
Japanese | ja |
Javanese | jv |
Kannada | kn |
Kanuri | |
Kashmiri | ks |
Kazakh | kk |
Kinyarwanda (Ruanda) | rw |
Kirghiz | ky |
Kirundi (Rundi) | rn |
Konkani | |
Korean | ko |
Kurdish | ku |
Laothian | lo |
Latin | la |
Latvian (Lettish) | lv |
Limburgish ( Limburger) | li |
Lingala | ln |
Lithuanian | lt |
Macedonian | mk |
Malagasy | mg |
Malay | ms |
Malayalam | ml |
Maltese | mt |
Maori | mi |
Marathi | mr |
Moldavian | mo |
Mongolian | mn |
Nauru | na |
Nepali | ne |
Norwegian | no |
Occitan | oc |
Oriya | or |
Oromo (Afan, Galla) | om |
Papiamentu | |
Pashto (Pushto) | ps |
Polish | pl |
Portuguese | pt |
Punjabi | pa |
Quechua | qu |
Rhaeto-Romance | rm |
Romanian | ro |
Russian | ru |
Sami (Lappish) | |
Samoan | sm |
Sangro | sg |
Sanskrit | sa |
Serbian | sr |
Serbo-Croatian | sh |
Sesotho | st |
Setswana | tn |
Shona | sn |
Sindhi | sd |
Sinhalese | si |
Siswati | ss |
Slovak | sk |
Slovenian | sl |
Somali | so |
Spanish | es |
Sundanese | su |
Swahili (Kiswahili) | sw |
Swedish | sv |
Syriac | |
Tagalog | tl |
Tajik | tg |
Tamazight | |
Tamil | ta |
Tatar | tt |
Telugu | te |
Thai | th |
Tibetan | bo |
Tigrinya | ti |
Tonga | to |
Tsonga | ts |
Turkish | tr |
Turkmen | tk |
Twi | tw |
Uighur | ug |
Ukrainian | uk |
Urdu | ur |
Uzbek | uz |
Venda | |
Vietnamese | vi |
Volapük | vo |
Welsh | cy |
Wolof | wo |
Xhosa | xh |
Yi | |
Yiddish | yi, ji |
Yoruba | yo |
Zulu | zu |
This is the end of the series. I hope you appreciated it.
Chrys
Related Links
Major in Website DesignWeb Development Course
HTML Course
CSS Course
ECMAScript Course