meta元素共有三个可选属性(http-equiv、name和scheme)和一个必选属性(content),content定义与 http-equiv 或 name 属性相关的元信息
可选属性
属性 | 值 | 描述 |
---|
http-equiv | content-type / expire / refresh / set-cookie | 把content属性关联到HTTP头部 |
name | author / description / keywords / generator / revised / others | 把 content 属性关联到一个名称 |
scheme | some_text | 定义用于翻译 content 属性值的格式 |
必选属性
属性 | 值 | 描述 |
---|
content | some_text | 定义与 http-equiv 或 name 属性相关的元信息 |
name属性
name="author" content="author name" />
name="description" content="meta元素共有三个可选属性(不超过150字符)" />
name="keywords" content="meta标签总结,meta标签" />
name="generator" content="hexo" />
name="revised" content="story,2015/07/22" />
name="copyright" content="All Rights Reserved" />
name="robots" content="index,follow" />
http-equiv
http-equiv="content-type" content="text/html;charset=UTF-8" />
http-equiv="expire" content="Wed,22Jul201511:11:11GMT" />
http-equiv="refresh" content="0;URL=''" />
http-equiv="set-cookie" content="cookie value=xxx;expires=Wed,22-Jul-201511:11:11GMT;path=/" />
http-equiv="Content-Script-Type"Content="text/javascript">
http-equiv="Pragma"content="no-cache">
移动端
name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
name="screen-orientation" content="portrait">
name="x5-orientation" content="portrait">
name="full-screen" content="yes">
name="x5-fullscreen" content="true">
name="browsermode" content="application">
name="x5-page-mode" content="app">
name="apple-mobile-web-app-capable" content="yes" />
name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
name="apple-mobile-web-app-title" content="标题">
name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
name="format-detection" content="telephone=no">
name="format-detection" content="email=no">
name="format-detection" content="adress=no">
name="format-detection" content="telephone=no,email=no,adress=no">
欢迎补充