html设置网页文字及语言

html4设置网页文字及语言

语法

第一种方法:
<meta http-equiv=“Content-type” content=“text/html”;charset=“字符集”>
第二种方法:
<meta http-equiv=“Content-Language” content=“语言”>

语法解释
在该语法中,http-equiv用于传送http通信协议的标头,也就是设定标头属性的名称,在content中才设置其具体的值。
之中charset设置本网页的内码语系,也就是字符集的类型,charset往往设置为utf-8,此外还有BIG5,GB2312,shift-Jis等字符集。
如果采用第二种方法,简体的设置为:

<meta http-equiv=“Content-Language” content=“zh_CN”>

html5设置网页文字及语言

<meta charset=“utf-8”>

Guess you like

Origin blog.csdn.net/weixin_41065922/article/details/108731096