使用 HTML5 doctype,不区分大小写。
常用Meta标签:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
声明文档使用的字符编码
<html>和<html>
简体中文和繁体中文,lang 属性写法 。z'z'z
<meta http-equiv="X-UA-Compatible" content="IE=edge">
避免使用IE兼容模式
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
如果安装了 Google Chrome Frame,则使用 GCF 来渲染页面,如果没有安装 GCF,则使用最高版本的 IE 内核进行渲染
<meta name="renderer" content="webkit">
360 浏览器就会在读取到这个标签后,立即切换对应的极速内核
<meta http-equiv="Cache-Control" content="no-siteapp" />
通过手机百度搜索打开网页时,百度会对你的网页进行转码
<meta name="keywords" content="your keywords">
页面关键词 keywords
<meta name="description" content="your description">
页面描述内容 description
<meta name="author" content="author,email address">
定义网页作者 author
<meta name="apple-mobile-web-app-capable" content="yes" />
是否启用 WebApp 全屏模式
<meta name="google" value="notranslate" />
关闭chrome浏览器下翻译插件
<meta name="format-detection" content="telphone=no, email=no"/>
忽略页面中的数字电话和email识别
<meta name="apple-mobile-web-app-capable" content="yes" />
设置Web应用是否以全屏模式运行
<meta name='apple-touch-fullscreen' content='yes'>
"添加到主屏幕“后,打开时全屏显示
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
定义网页搜索引擎索引方式,robotterms是一组使用英文逗号「,」分割的值,取值一般有:none,noindex,nofollow,all,index和follow。
<meta name="robots" content="index,follow" /> <!-- 搜索引擎抓取 -->