常用的meta标签

1.文档的字符编码

<meta charset="utf-8">

2.移动端适配

<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 minimal-ui">

uc强制竖屏
<meta name="screen-orientation" content="portrait"/>

UC强制全屏
<meta name="full-screen" content="yes">

3.SEO优化

1、keywords用来告诉搜索引擎你网页的关键字是什么。
<meta name="keywords" content="xxxx">

2、description用来告诉搜索引擎你的网站主要内容。
<meta name="description" content="xxx">

4.强制浏览器使用WebKit内核

强制Chromium内核,作用于360浏览器、QQ浏览器等国产双核浏览器:
<meta name="render" content="webkit"/>

强制Chromium内核,作用于其他双核浏览器:
<meta name="force-rendering" content="webkit"/>

如果有安装 Google Chrome Frame 插件则强制为Chromium内核,否则强制本机支持的最高版本IE内核,作用于IE浏览器:
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>

5.格式检测

<meta name=”format-detection” content=”telephone=no,email=no,adress=no”>

  • telephone,主要作用是是否设置自动将你的数字转化为拨号连接
  • email,告诉设备不识别邮箱,点击之后不自动发送
  • adress,跳转至地图