1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| meta | | name | |---------------- |----keywords |----description |----application/name |----author |----generator |---------------| http-equiv | |---------------- |----content-type |----refresh |----default-style |----content-language |----set-cookie content | |---------------- | | | charset ``` /** * IE兼容模式 * @http-equiv 属性 */ ``` bash <meta http-equiv="X-UA-Compatible" content="IE=8">
|
用法 分三种
1.网站描述 优化== name与content组合
example:
1 2 3
| <meta name="keywords" content="...."> <meta name="description" content="...."> <meta name="author" content="....">
|
2.http指令
example:
1 2
| <meta http-equiv="Content-Type" content="text/json"> <meta http-equiv="refresh" content="3">
|
3.字符集
example:
html5写法
example:
<meta http-equiv="Content-Type" content="text/html;charset=utf8">
header('Content-Type:text/html;charset=utf-8')