Modern HTML lang Attribute for Chinese Websites
Chinese is pretty complicated, same applies to
<html lang="__WTF?__"> attribute.
Fortunately, I've already summarized it up:
zh-SGstill works fine, even if there are opposite opinions;
zh-cmn-Hans-CNworks best for contents localized for China Mainland users:
zhfor backward compatibility since it's been widely adopted by mainstream websites and crawlers, etc;
cmndenotes Chinese Mandarin, the official speech of Chinese;
Hansdenotes that the contents are in Simplified Chinese form;
CNdenotes the contents were specifically adapted for China Mainland.
zh-Hantworks great for contents written in Traditional Chinese;
- When in doubt, use bare
<!DOCTYPE html> <html lang="zh-cmn-Hans-CN"> <meta charset="UTF-8"/> <title>你好，世界！</title> ...