# HTML 语言代码参考手册
## ISO 语言代码
HTML 的 lang 属性可用于网页或部分网页的语言。这对搜索引擎和浏览器是有帮助的。
根据 W3C 推荐标准,您应该通过 <html> 标签中的 lang 属性对每张页面中的主要语言进行声明,比如:
```
<html lang="en">
...
</html>
```
在 XHTML 中,采用如下方式在 <html> 标签中对语言进行声明:
```
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
...
</html>
```
## ISO 639-1 语言代码
ISO 639-1 为各种语言定义了缩略词。您可以在 HTML 和 XHTML 中的 lang 和 xml:lang 属性中使用它们。
| 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 |
| Volapuk | vo |
| Welsh | cy |
| Wolof | wo |
| Xhosa | xh |
| Yi |
| Yiddish | yi, ji |
| Yoruba | yo |
| Zulu | zu |
- HTML 标签列表
- HTML <!--...--> 标签
- HTML <!DOCTYPE> 标签
- HTML <a> 标签
- HTML <abbr> 标签
- HTML <acronym> 标签
- HTML <address> 标签
- HTML <applet> 标签
- HTML <area> 标签
- HTML <article> 标签
- HTML <aside> 标签
- HTML <audio> 标签
- HTML <b> 标签
- HTML <base> 标签
- HTML <basefont> 标签
- HTML <bdi> 标签
- HTML <bdo> 标签
- HTML <big> 标签
- HTML <blockquote> 标签
- HTML <body> 标签
- HTML <br> 标签
- HTML <button> 标签
- HTML <canvas> 标签
- HTML <caption> 标签
- HTML <center> 标签
- HTML <cite> 标签
- HTML <em> <strong> <dfn> <code> <samp> <kbd><var> <cite> 标签
- HTML <col> 标签
- HTML <colgroup> 标签
- HTML <command> 标签
- HTML <datalist> 标签
- HTML <dd> 标签
- HTML <del> 标签
- HTML <details> 标签
- HTML <dialog> 标签
- HTML <dir> 标签
- HTML <div> 标签
- HTML <dl> 标签
- HTML <dt> 标签
- HTML <embed> 标签
- HTML <fieldset> 标签
- HTML <figcaption> 标签
- HTML <figure> 标签
- HTML <font> 标签
- HTML <footer> 标签
- HTML <form> 标签
- HTML <frame> 标签
- HTML <frameset> 标签
- HTML <h1> 到 <h6> 标签
- HTML <head> 标签
- HTML <header> 标签
- HTML <hr> 标签
- HTML <html> 标签
- HTML <i> 标签
- HTML <iframe> 标签
- HTML <img> 标签
- HTML <input> 标签
- HTML DOM Button 对象
- HTML DOM Checkbox 对象
- HTML DOM Color 对象
- HTML DOM Input Date 对象
- HTML DOM Datetime 对象
- HTML DOM Datetime Local 对象
- HTML DOM Email 对象
- HTML DOM FileUpload 对象
- HTML DOM Hidden 对象
- HTML DOM Input Image 对象
- HTML DOM Month 对象
- HTML DOM Number 对象
- HTML DOM Password 对象
- HTML DOM Input Range 对象
- HTML DOM Radio 对象
- HTML DOM Reset 对象
- HTML DOM Input Search 对象
- HTML DOM Submit 对象
- HTML DOM Text 对象
- HTML DOM Input Time 对象
- HTML DOM Input URL 对象
- HTML DOM Input Week 对象
- HTML <ins> 标签
- HTML <keygen> 标签
- HTML <label> 标签
- HTML <legend> 标签
- HTML <li> 标签
- HTML <link> 标签
- HTML <main> 标签
- HTML <map> 标签
- HTML <mark> 标签
- HTML <menu> 标签
- HTML <menuitem> 标签
- HTML <meta> 标签
- HTML <meter> 标签
- HTML <nav> 标签
- HTML <noframes> 标签
- HTML <noscript> 标签
- HTML <object> 标签
- HTML <ol> 标签
- HTML <optgroup> 标签
- HTML <option> 标签
- HTML <output> 标签
- HTML <p> 标签
- HTML <param> 标签
- HTML <pre> 标签
- HTML <progress> 标签
- HTML <q> 标签
- HTML <rp> 标签
- HTML <rt> 标签
- HTML <ruby> 标签
- HTML <s> 标签
- HTML <script> 标签
- HTML <section> 标签
- HTML <select> 标签
- HTML <small> 标签
- HTML <source> 标签
- HTML <span> 标签
- HTML <strike> 标签
- HTML <style> 标签
- HTML <sub> 标签
- HTML <summary> 标签
- HTML <sup> 标签
- HTML <table> 标签
- HTML <tbody> 标签
- HTML <td> 标签
- HTML <textarea> 标签
- HTML <tfoot> 标签
- HTML <th> 标签
- HTML <thead> 标签
- HTML <time> 标签
- HTML <title> 标签
- HTML <tr> 标签
- HTML <track> 标签
- HTML <tt> 标签
- HTML <u> 标签
- HTML <ul> 标签
- HTML <video> 标签
- HTML <wbr> 标签
- HTML 全局属性
- HTML accesskey 属性
- HTML class 属性
- HTML contenteditable 属性
- HTML contextmenu 属性
- HTML data-* 属性
- HTML dir 属性
- HTML draggable 属性
- HTML dropzone 属性
- HTML hidden 属性
- HTML id 属性
- HTML lang 属性
- HTML spellcheck 属性
- HTML style 属性
- HTML tabindex 属性
- HTML title 属性
- HTML translate 属性
- HTML 事件属性
- HTML 5 视频/音频参考手册
- HTML 5 Canvas 参考手册
- HTML 元素和有效的 DTD
- HTML 颜色名
- HTML 字符集
- HTML ASCII 参考手册
- HTML ISO-8859-1 参考手册
- HTML 4.01 符号实体
- HTML URL 编码
- HTML 语言代码参考手册
- HTTP 状态消息
- HTTP 方法:GET 对比 POST
- 免责声明