meta常用标签总结

简介: meta常用标签总结

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属性

<!-- 页面作者 -->
<meta name="author" content="author name" />
<!-- 页面描述 -->
<meta name="description" content="meta元素共有三个可选属性(不超过150字符)" />
<!-- 页面关键词 -->
<meta name="keywords" content="meta标签总结,meta标签" />
<!-- 页面生成器 -->
<meta name="generator" content="hexo" />
<!-- 页面修改信息 -->
<meta name="revised" content="story,2015/07/22" />
<!-- 版权信息 -->
<meta name="copyright" content="All Rights Reserved" />
<!-- 页面爬虫设置 -->
<meta name="robots" content="index,follow" />
<!-- robots的content取值 -->
<!-- all:文件将被检索,且页面上的链接可以被查询 -->
<!-- none:文件将不被检索,且页面上的链接不可以被查询 -->
<!-- index:文件将被检索 -->
<!-- follow:页面上的链接可以被查询 -->
<!-- noindex:文件将不被检索,但页面上的链接可以被查询 -->
<!-- nofollow:文件将被检索,但页面上的链接不可以被查询 -->
http-equiv
<!-- 字符编码 -->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<!-- 页面到期时间 -->
<meta http-equiv="expire" content="Wed,22Jul201511:11:11GMT" />
<!-- 页面重刷新,0秒后刷新并跳转 -->
<meta http-equiv="refresh" content="0;URL=''" />
<!-- cookie设置 -->
<meta http-equiv="set-cookie" content="cookie value=xxx;expires=Wed,22-Jul-201511:11:11GMT;path=/" />
<!-- 脚本类型 -->
<meta http-equiv="Content-Script-Type"Content="text/javascript">
<!-- 禁止从本地缓存中读取页面 -->
<meta http-equiv="Pragma"content="no-cache">

移动端

<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<!-- viewport的content取值 -->
<!-- width:宽度(数值 / device-width)(200~10000,默认为980px) -->
<!-- height:高度(数值 / device-height)(223~10000) -->
<!-- initial-scale:初始缩放比例 (0~10) -->
<!-- minimum-scale:允许用户缩放到的最小比例 -->
<!-- maximum-scale:允许用户缩放到的最大比例 -->
<!-- user-scalable:是否允许用户缩放 (no/yes)  -->
<!-- uc强制竖屏 -->
<meta name="screen-orientation" content="portrait">
<!-- QQ强制竖屏 -->
<meta name="x5-orientation" content="portrait">
<!-- UC强制全屏 -->
<meta name="full-screen" content="yes">
<!-- QQ强制全屏 -->
<meta name="x5-fullscreen" content="true">
<!-- UC应用模式 -->
<meta name="browsermode" content="application">
<!-- QQ应用模式 -->
<meta name="x5-page-mode" content="app">
<!-- IOS启用 WebApp 全屏模式 -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- IOS全屏模式下隐藏状态栏/设置状态栏颜色 content的值为default | black | black-translucent  -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- IOS添加到主屏后的标题 -->
<meta name="apple-mobile-web-app-title" content="标题">
<!-- IOS添加智能 App 广告条 Smart App Banner -->
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
<!-- 去除iphone 识别数字为号码 -->
<meta name="format-detection" content="telephone=no">
<!-- 不识别邮箱 -->
<meta name="format-detection" content="email=no">
<!-- 禁止跳转至地图 -->
<meta name="format-detection" content="adress=no">
<!-- 可以连写-->
<meta name="format-detection" content="telephone=no,email=no,adress=no">

强制双核浏览器以webkit内核打开网站

<meta name="renderer" content="webkit" />

转载自:http://mp.weixin.qq.com/s/35XwhOW03njePN1SB3CxMQ


相关文章
|
SQL 数据库 数据安全/隐私保护
Sql Server数据库Sa密码如何修改
Sql Server数据库Sa密码如何修改
1081 0
针对react-captcha-code第三方插件不能每次触发深颜色的处理
针对`react-captcha-code`插件生成浅色验证码的问题,通过改造成class组件`MyCaptcha.js`,自定义颜色和验证码生成逻辑,解决了颜色问题。
175 1
针对react-captcha-code第三方插件不能每次触发深颜色的处理
确保你已经安装了`dronekit`库。如果没有,你可以使用pip来安装:
确保你已经安装了`dronekit`库。如果没有,你可以使用pip来安装:
|
Kubernetes 监控 API
在K8S中,什么是 Minikube、Kubectl、Kubelet?
在K8S中,什么是 Minikube、Kubectl、Kubelet?
|
SQL 关系型数据库 MySQL
Python系列:教你使用PyMySQL操作MySQL数据库
Python系列:教你使用PyMySQL操作MySQL数据库
752 8
|
设计模式 中间件 测试技术
PHP中的中间件模式:简化代码与增强可维护性
【8月更文挑战第2天】 在PHP开发中,中间件模式是一种优雅的设计模式,它允许开发者通过定义一系列可重用的过滤和处理层来构建复杂的请求处理流程。本文将深入探讨如何在PHP应用程序中实现中间件模式,并辅以实际代码示例,展示如何利用这一模式简化代码结构,提高应用的可读性、可测试性和可维护性。通过阅读本文,你将学会创建自己的中间件,并将其集成到你的PHP项目中,从而提升你的开发效率和项目质量。
|
存储
建立动态链表
建立动态链表
151 1
|
Java 数据库
SpringBoot出现com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect datetime va
SpringBoot出现com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect datetime va
955 0
|
关系型数据库 MySQL 数据库
连接mysql报Access denied for user 'root'@'localhost'错误的解决办法
连接mysql报Access denied for user 'root'@'localhost'错误的解决办法
1403 0
|
算法 关系型数据库 MySQL
MySQL 的索引类型及使用场景
MySQL支持多种类型的索引,每种索引类型都有不同的使用场景。下面是一些常见的索引类型及其适用场景: 1. B-树索引:B-树索引是MySQL的默认索引类型。它适用于经常需要范围查询的列,例如日期范围查询、区间查询等。B-树索引也适用于针对大型表进行排序和分组查询。 2. 唯一索引:唯一索引确保索引列中的值是唯一的。它适用于要求索引列的值不重复的场景。 3. 主键索引:主键索引是唯一索引的一种特殊类型。它用于定义表的主键,并且主键值不能为NULL。主键索引可以帮助快速查找表中的唯一行。 4. 全文索引:全文索引用于全文搜索场景,支持对文本数据进行全文搜索和相关性排序。它适用于需要执行全
764 0