HTML中的meta设置方法

php中世界最好的语言
php中世界最好的语言 原创
2018-01-22 10:46:05 1844浏览

这次给大家带来HTML中的meta设置方法,HTML中设置meta的注意事项有哪些,下面就是实战案例,一起来看一下。

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

<meta name="format-detection" content="telephone=no">

<meta name="apple-mobile-web-app-capable" content="yes">

<meta name="apple-mobile-web-app-status-bar-style" content="#6f9ddc">

<!-- 页面的编码方式 -->

<meta charset="utf-8">

<!-- 优先使用最新版本 IE 和 Chrome -->

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<!-- 搜索引擎优化,页面关键词,每个网页应具有描述该网页内容的一组唯一的关键字 -->

<meta name="keywords" content="">

<!-- 搜索引擎优化,页面描述,每个网页都应有一个不超过 150 个字符且能准确反映网页内容的描述标签 -->

<meta name="description" content="">

<!-- 优化移动浏览器的显示,缩放比例默认为1,不允许手动缩放。如果不是响应式网站,不要使用initial-scale或者禁用缩放。 -->

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<!-- 使用 webkit 内核渲染网站 -->

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

<!-- 禁止百度转码 -->

<meta http-equiv="Cache-Control" content="no-siteapp">

<!-- 添加到主屏后的图标 -->

<!-- <link rel="icon" type="image/png" href="//m.sbmmt.com/m/faq/assets/i/favicon.png"> -->

<!-- 添加到主屏后-启用 WebApp 全屏模式(Android) -->

<!-- <meta name="mobile-web-app-capable" content="yes"> -->

<!-- 添加到主屏后的图标(Android) -->

<!-- <link rel="icon" sizes="192x192" href="//m.sbmmt.com/m/faq/assets/i/app-icon72x72@2x.png"> -->

<!-- 添加到主屏后-启用 WebApp 全屏模式(iOS) -->

<!-- <meta name="apple-mobile-web-app-capable" content="yes"> -->

<!-- 添加到主屏后-设置状态栏的背景颜色(iOS) -->

<!-- <meta name="apple-mobile-web-app-status-bar-style" content="black"> -->

<!-- 添加到主屏后的标题(iOS) -->

<!-- <meta name="apple-mobile-web-app-title" content="南航办公自动化" /> -->

<!-- 添加到主屏后的图标(iOS) -->

<!-- <link rel="apple-touch-icon-precomposed" href="//m.sbmmt.com/m/faq/assets/i/app-icon72x72@2x.png"> -->

<!-- 添加到主屏后的图标(win8) -->

<!-- <meta name="msapplication-TileImage" content="//m.sbmmt.com/m/faq/assets/i/app-icon72x72@2x.png"> -->

<!-- 添加到主屏后-设置状态栏的背景颜色(win8) -->

<!-- <meta name="msapplication-TileColor" content="#0e90d2"> -->

<!-- 关闭移动端手机号码识别(iOS) -->

<meta name="format-detection" content="telephone=no">

<!-- 关闭移动端邮箱识别(Android) -->

<meta name="format-detection" content="email=no">

相信看了这些案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

相关阅读:

HTML文本格式化的实例详解

html里的列表标签有哪些?

html标题,段落,换行,水平线,特殊字符应该如何使用

以上就是HTML中的meta设置方法的详细内容,更多请关注php中文网其它相关文章!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。