HTML5 meta 的使用

2024-08-25 09:18
文章标签 html5 meta 使用 frontend

本文主要是介绍HTML5 meta 的使用,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

<!DOCTYPE html>
<!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans">
<!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->

<head>
  <!-- 声明文档使用的字符编码 -->
  <meta charset='utf-8'>
  <!-- 优先使用 IE 最新版本和 Chrome -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <!-- 页面描述 -->
  <meta name="description" content="不超过150个字符" />
  <!-- 页面关键词 -->
  <meta name="keywords" content="" />
  <!-- 网页作者 -->
  <meta name="author" content="name, email@gmail.com" />
  <!-- 搜索引擎抓取 -->
  <meta name="robots" content="index,follow" />
  <!-- 为移动设备添加 viewport -->
  <meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">
  <!-- `width=device-width` 会导致 iPhone 5 添加到主屏后以 WebApp 全屏模式打开页面时出现黑边 http://bigc.at/ios-webapp-viewport-meta.orz -->

  <!-- iOS 设备 begin -->
  <meta name="apple-mobile-web-app-title" content="标题">
  <!-- 添加到主屏后的标题(iOS 6 新增) -->
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <!-- 是否启用 WebApp 全屏模式,删除苹果默认的工具栏和菜单栏 -->

  <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
  <!-- 添加智能 App 广告条 Smart App BanneriOS 6+ Safari-->
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <!-- 设置苹果工具栏颜色 -->
  <meta name="format-detection" content="telphone=no, email=no" />
  <!-- 忽略页面中的数字识别为电话,忽略email识别 -->
  <!-- 启用360浏览器的极速模式(webkit) -->
  <meta name="renderer" content="webkit">
  <!-- 避免IE使用兼容模式 -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <!-- 不让百度转码 -->
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 -->
  <meta name="HandheldFriendly" content="true">
  <!-- 微软的老式浏览器 -->
  <meta name="MobileOptimized" content="320">
  <!-- 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">
  <!-- windows phone 点击无高光 -->
  <meta name="msapplication-tap-highlight" content="no">
  <!-- iOS 图标 begin -->
  <link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-57x57-precomposed.png" />
  <!-- iPhone  iTouch,默认 57x57 像素,必须有 -->
  <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png" />
  <!-- Retina iPhone  Retina iTouch114x114 像素,可以没有,但推荐有 -->
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png" />
  <!-- Retina iPad144x144 像素,可以没有,但推荐有 -->
  <!-- iOS 图标 end -->

  <!-- iOS 启动画面 begin -->
  <link rel="apple-touch-startup-image" sizes="768x1004" href="/splash-screen-768x1004.png" />
  <!-- iPad 竖屏 768 x 1004(标准分辨率) -->
  <link rel="apple-touch-startup-image" sizes="1536x2008" href="/splash-screen-1536x2008.png" />
  <!-- iPad 竖屏 1536x2008Retina-->
  <link rel="apple-touch-startup-image" sizes="1024x748" href="/Default-Portrait-1024x748.png" />
  <!-- iPad 横屏 1024x748(标准分辨率) -->
  <link rel="apple-touch-startup-image" sizes="2048x1496" href="/splash-screen-2048x1496.png" />
  <!-- iPad 横屏 2048x1496Retina-->

  <link rel="apple-touch-startup-image" href="/splash-screen-320x480.png" />
  <!-- iPhone/iPod Touch 竖屏 320x480 (标准分辨率) -->
  <link rel="apple-touch-startup-image" sizes="640x960" href="/splash-screen-640x960.png" />
  <!-- iPhone/iPod Touch 竖屏 640x960 (Retina) -->
  <link rel="apple-touch-startup-image" sizes="640x1136" href="/splash-screen-640x1136.png" />
  <!-- iPhone 5/iPod Touch 5 竖屏 640x1136 (Retina) -->
  <!-- iOS 启动画面 end -->

  <!-- iOS 设备 end -->
  <meta name="msapplication-TileColor" content="#000" />
  <!-- Windows 8 磁贴颜色 -->
  <meta name="msapplication-TileImage" content="icon.png" />
  <!-- Windows 8 磁贴图标 -->

  <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml" />
  <!-- 添加 RSS 订阅 -->
  <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
  <!-- 添加 favicon icon -->

  <!-- sns 社交标签 begin -->
  <!-- 参考微博API -->
  <meta property="og:type" content="类型" />
  <meta property="og:url" content="URL地址" />
  <meta property="og:title" content="标题" />
  <meta property="og:image" content="图片" />
  <meta property="og:description" content="描述" />
  <!-- sns 社交标签 end -->

  <title>标题</title>
</head>

<body>
</body>

</html>

这篇关于HTML5 meta 的使用的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1105152

相关文章

Pandas使用SQLite3实战

《Pandas使用SQLite3实战》本文主要介绍了Pandas使用SQLite3实战,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学... 目录1 环境准备2 从 SQLite3VlfrWQzgt 读取数据到 DataFrame基础用法:读

JSON Web Token在登陆中的使用过程

《JSONWebToken在登陆中的使用过程》:本文主要介绍JSONWebToken在登陆中的使用过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录JWT 介绍微服务架构中的 JWT 使用结合微服务网关的 JWT 验证1. 用户登录,生成 JWT2. 自定义过滤

Java中StopWatch的使用示例详解

《Java中StopWatch的使用示例详解》stopWatch是org.springframework.util包下的一个工具类,使用它可直观的输出代码执行耗时,以及执行时间百分比,这篇文章主要介绍... 目录stopWatch 是org.springframework.util 包下的一个工具类,使用它

Java使用Curator进行ZooKeeper操作的详细教程

《Java使用Curator进行ZooKeeper操作的详细教程》ApacheCurator是一个基于ZooKeeper的Java客户端库,它极大地简化了使用ZooKeeper的开发工作,在分布式系统... 目录1、简述2、核心功能2.1 CuratorFramework2.2 Recipes3、示例实践3

springboot security使用jwt认证方式

《springbootsecurity使用jwt认证方式》:本文主要介绍springbootsecurity使用jwt认证方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地... 目录前言代码示例依赖定义mapper定义用户信息的实体beansecurity相关的类提供登录接口测试提供一

go中空接口的具体使用

《go中空接口的具体使用》空接口是一种特殊的接口类型,它不包含任何方法,本文主要介绍了go中空接口的具体使用,具有一定的参考价值,感兴趣的可以了解一下... 目录接口-空接口1. 什么是空接口?2. 如何使用空接口?第一,第二,第三,3. 空接口几个要注意的坑坑1:坑2:坑3:接口-空接口1. 什么是空接

springboot security快速使用示例详解

《springbootsecurity快速使用示例详解》:本文主要介绍springbootsecurity快速使用示例,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝... 目录创www.chinasem.cn建spring boot项目生成脚手架配置依赖接口示例代码项目结构启用s

Python如何使用__slots__实现节省内存和性能优化

《Python如何使用__slots__实现节省内存和性能优化》你有想过,一个小小的__slots__能让你的Python类内存消耗直接减半吗,没错,今天咱们要聊的就是这个让人眼前一亮的技巧,感兴趣的... 目录背景:内存吃得满满的类__slots__:你的内存管理小助手举个大概的例子:看看效果如何?1.

java中使用POI生成Excel并导出过程

《java中使用POI生成Excel并导出过程》:本文主要介绍java中使用POI生成Excel并导出过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录需求说明及实现方式需求完成通用代码版本1版本2结果展示type参数为atype参数为b总结注:本文章中代码均为

Spring Boot3虚拟线程的使用步骤详解

《SpringBoot3虚拟线程的使用步骤详解》虚拟线程是Java19中引入的一个新特性,旨在通过简化线程管理来提升应用程序的并发性能,:本文主要介绍SpringBoot3虚拟线程的使用步骤,... 目录问题根源分析解决方案验证验证实验实验1:未启用keep-alive实验2:启用keep-alive扩展建