HTML Lang Codes Table
| HTML attribute | Code | Language |
|---|---|---|
| lang="ab" | ab | Abkhaz |
| lang="af" | af | Afrikaans |
| lang="am" | am | Amharic |
| lang="ar" | ar | Arabic |
| lang="az" | az | Azerbaijani |
| lang="be" | be | Belarusian |
| lang="bg" | bg | Bulgarian |
| lang="bn" | bn | Bengali |
| lang="bs" | bs | Bosnian |
| lang="ca" | ca | Catalan |
| lang="cs" | cs | Czech |
| lang="da" | da | Danish |
| lang="de" | de | German |
| lang="el" | el | Greek |
| lang="en" | en | English |
| lang="es" | es | Spanish |
| lang="et" | et | Estonian |
| lang="fa" | fa | Persian |
| lang="fi" | fi | Finnish |
| lang="fil" | fil | Filipino |
| lang="fr" | fr | French |
| lang="ga" | ga | Irish |
| lang="he" | he | Hebrew |
| lang="hi" | hi | Hindi |
| lang="hr" | hr | Croatian |
| lang="hu" | hu | Hungarian |
| lang="hy" | hy | Armenian |
| lang="id" | id | Indonesian |
| lang="is" | is | Icelandic |
| lang="it" | it | Italian |
| lang="ja" | ja | Japanese |
| lang="ka" | ka | Georgian |
| lang="kk" | kk | Kazakh |
| lang="km" | km | Khmer |
| lang="ko" | ko | Korean |
| lang="ky" | ky | Kyrgyz |
| lang="lo" | lo | Lao |
| lang="lt" | lt | Lithuanian |
| lang="lv" | lv | Latvian |
| lang="mk" | mk | Macedonian |
| lang="ml" | ml | Malayalam |
| lang="mn" | mn | Mongolian |
| lang="mr" | mr | Marathi |
| lang="ms" | ms | Malay |
| lang="my" | my | Burmese |
| lang="ne" | ne | Nepali |
| lang="nl" | nl | Dutch |
| lang="no" | no | Norwegian |
| lang="pa" | pa | Punjabi |
| lang="pl" | pl | Polish |
| lang="pt" | pt | Portuguese |
| lang="ro" | ro | Romanian |
| lang="ru" | ru | Russian |
| lang="si" | si | Sinhala |
| lang="sk" | sk | Slovak |
| lang="sl" | sl | Slovenian |
| lang="sq" | sq | Albanian |
| lang="sr" | sr | Serbian |
| lang="sv" | sv | Swedish |
| lang="sw" | sw | Swahili |
| lang="ta" | ta | Tamil |
| lang="te" | te | Telugu |
| lang="th" | th | Thai |
| lang="tr" | tr | Turkish |
| lang="uk" | uk | Ukrainian |
| lang="ur" | ur | Urdu |
| lang="uz" | uz | Uzbek |
| lang="vi" | vi | Vietnamese |
| lang="zh" | zh | Chinese |
lang attribute; the tag structure and region-suffix rules follow W3C's guide to choosing language tags. The attribute is not decoration: screen readers switch pronunciation engines on it, spellcheckers pick dictionaries from it, and search engines use it as a hint - a page declared lang="en" full of Portuguese text reads badly for the users who need it most. Region subtags refine: en-US vs en-GB changes spelling and date formats, zh-Hans vs zh-Hant splits simplified and traditional Chinese. Bottom line: set lang on the html element, override inline where a paragraph switches languages, and the table above is the whole legal vocabulary of openers. Text-tool neighbors: Unicode character inspector, ASCII table, URL parser, HTTP methods table.The lang attribute is the most-read two letters on your page: screen readers switch voices on it, spellcheckers load dictionaries from it, and search engines treat it as a language hint. This table lists the ISO 639-1 subtags for 69 major languages, ready to copy as a complete lang attribute.
The tag grammar comes from W3Cโs internationalization guides: a language subtag, optionally a region suffix (en-US, pt-BR, zh-Hans), set once on the html element and overridden inline where the text switches language.
How to use
- Type a code or a language name to filter; click any row to copy the full lang attribute quoted and ready.
- Set the page-level language once on html, then wrap any paragraph that switches languages in its own lang attribute.
- Region suffixes change spelling and formats: en-GB keeps British spelling, fr-CA switches date order - use them when the difference matters to readers.
Frequently asked questions
Why does the lang attribute matter for accessibility?
Screen readers pick pronunciation engines per lang - an undeclared page makes a Portuguese paragraph read as garbled English phonemes. WCAG success criterion 3.1.1 requires a page-level language, and 3.1.2 requires marking the switches.
What is the difference between zh and zh-Hans?
zh says Chinese without a script; zh-Hans specifies Simplified (mainland) and zh-Hant Traditional (Taiwan, Hong Kong). The script subtag matters more than the region here - the same lang value can render two visually different writing systems.
Can I use lang on a span for one word?
Yes - and you should: wrapping a foreign word or quote in a span with its own lang attribute keeps screen readers, hyphenation and styling correct for that run of text. The attribute is valid on any HTML element.
Where do the two-letter codes come from?
ISO 639-1, maintained by the Library of Congress as the registration authority for the IANA language subtag registry the web actually uses. New codes appear rarely - the list is one of the most stable vocabularies on the web.