公司版权注释:
<!--- The site is designed by EHM,Inc 07/2005 --->
字符集
<!-- 指定当前页面的编码格式是国际统一编码格式:UTF-8 GBK(GB2312)中国编码... --><!-- UTF-8则包含全世界所有国家需要用到的字符 --><!-- gb2312 简单中文 包括6763个汉字--><!-- BIG5 繁体中文 港澳台等用 --><!-- GBK包含全部中文字符 是GB2312的扩展,加入对繁体字的支持,兼容GB2312 --><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta charset="utf-8">
适配移动端
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
width=device-width宽度 = 设备宽度user-scalable=no用户缩放 = 不允许initial-scale=1.0初始比例 = 1maximum-scale=1.0最大比例 = 1minimum-scale=1.0最小比例 = 1
让IE浏览器以最新的模式渲染页面
<meta http-equiv="x-ua-compatible" content="ie=edge">
允许控制资源的过度加载
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
Web 应用的名称(仅当网站被用作为一个应用时才使用)
<meta name="application-name" content="应用名称">
控制搜索引擎的抓取和索引行为
<meta name="robots" content="index,follow,noodp"><!-- 所有的搜索引擎 -->
<meta name="googlebot" content="index,follow"><!-- 仅对 Google 有效 -->
制作者信息
<meta name="author" content="webmaster@maketown.com">
网站简介
<meta name="description"content="xxxxxxxxxxxxxxxxxxxxxxxxxx">
关键字
<meta name="keywords" content="xxxx,xxxx,xxx,xxxxx,xxxx,">
css引入
<link href="../css/style.css" rel="stylesheet" type="text/css">
所有的javascript的调用尽量采取外部调用.
<script language="JavaScript" src="script/xxxxx.js"></SCRIPT>
网页标题
<title>xxxxxxxxxxxxxxxxxx</title>
引入ico图标
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
附body标签:
<body>标签不属于head区,这里强调一下,为了保证浏览器的兼容性,必须设置页面背景<bodybgcolor="#FFFFFF">
可以选择加入的标签
设定网页的到期时间。一旦网页过期,必须到服务器上重新调阅。
<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
禁止浏览器从本地机的缓存中调阅页面内容。
<meta http-equiv="Pragma" content="no-cache">
用来防止别人在框架里调用你的页面。
<meta http-eqyuv="Window-target" content="_top">
自动跳转
<meta http-equiv="Refresh" content="5;URL=http://www.yahoo.com"> 5指时间停留5秒
网页搜索机器人向导。用来告诉搜索机器人哪些页面需要索引,哪些页面不需要索引
<meta name="robots" content="none">
CONTENT的参数有all,none,index,noindex,follow,nofollow。默认是all。
收藏夹图标
<link rel = "Shortcut Icon" href="favicon.ico">
link
<!-- 有助于防止出现内容重复的问题 -->
<link rel="canonical" href="https://example.com/2010/06/9-things-to-do-before-entering-social-media.html">
<!-- 之前用于包含 icon 链接,但已被废弃并不再使用 -->
<link rel="shortlink" href="https://example.com/?p=42">
<!-- 链接到当前文档的一个 AMP HTML 版本 -->
<link rel="amphtml" href="https://example.com/path/to/amp-version.html">
<!-- 表明一个 CSS 样式表 -->
<link rel="stylesheet" href="https://example.com/styles.css">
<!-- 链接到一个指定 Web 应用程序“安装”证书的 JSON 文件 -->
<link rel="manifest" href="manifest.json">
<!-- 链接到文档的作者 -->
<link rel="author" href="humans.txt">
<!-- 指向一个适用于链接内容的版权申明 -->
<link rel="copyright" href="copyright.html">
<!-- 给出可能的你的另一种语言的文档位置参考 -->
<link rel="alternate" href="https://es.example.com/" hreflang="es">
<!-- 提供了关于作者或其他人的信息 -->
<link rel="me" href="https://google.com/profiles/thenextweb" type="text/html">
<link rel="me" href="mailto:name@example.com">
<link rel="me" href="sms:+15035550125">
<!-- 链接到一个文档,包含当前文档的一个归档链接 -->
<link rel="archives" href="https://example.com/2003/05/" title="May 2003">
<!-- 链接到层次结构中的顶级资源 -->
<link rel="index" href="https://example.com/" title="DeWitt Clinton">
<!-- 给出该文档的起点 -->
<link rel="start" href="https://example.com/photos/pattern_recognition_1_about/" title="Pattern Recognition 1">
<!-- 引导当前文档的前述资源序列 -->
<link rel="prev" href="https://example.com/opensearch/opensearch-and-openid-a-sure-way-to-get-my-attention/" title="OpenSearch and OpenID? A sure way to get my attention.">
<!-- 给出一个自我参考 - 当文档有多个可能的参考时非常有用 -->
<link rel="self" type="application/atom+xml" href="https://example.com/atomFeed.php?page=3">
<!-- 分别是在一系列文件中的第一个、下一个、上一个和最后一个 -->
<link rel="first" href="https://example.com/atomFeed.php">
<link rel="next" href="https://example.com/atomFeed.php?page=4">
<link rel="previous" href="https://example.com/atomFeed.php?page=2">
<link rel="last" href="https://example.com/atomFeed.php?page=147">
<!-- 当使用第三方服务来维护 blog 时使用 -->
<link rel="EditURI" href="https://example.com/xmlrpc.php?rsd" type="application/rsd+xml" title="RSD">
<!-- 当另一个 WordPress 博客链接到你的 WordPress 博客或文章时形成一个自动化的评论 -->
<link rel="pingback" href="https://example.com/xmlrpc.php">
<!-- 当你在自己的页面上链接到一个 url 时通知它 -->
<link rel="webmention" href="https://example.com/webmention">
<!-- 加载一个外部的 HTML 文件到当前 HTML 文件中 -->
<link rel="import" href="component.html">
<!-- 打开搜索 -->
<link rel="search" href="/open-search.xml" type="application/opensearchdescription+xml" title="Search Title">
<!-- Feeds -->
<link rel="alternate" href="https://feeds.feedburner.com/example" type="application/rss+xml" title="RSS">
<link rel="alternate" href="https://example.com/feed.atom" type="application/atom+xml" title="Atom 0.3">
<!-- 预取,预载,预浏览 -->
<link rel="dns-prefetch" href="//example.com/">
<link rel="preconnect" href="https://www.example.com/">
<link rel="prefetch" href="https://www.example.com/">
<link rel="prerender" href="https://example.com/">
<link rel="preload" href="image.png" as="image">
favicon 图标
<link rel="icon" href="path/to/favicon-16.png" sizes="16x16" type="image/png">
<link rel="icon" href="path/to/favicon-32.png" sizes="32x32" type="image/png">
<link rel="icon" href="path/to/favicon-48.png" sizes="48x48" type="image/png">
<link rel="icon" href="path/to/favicon-62.png" sizes="62x62" type="image/png">
<link rel="icon" href="path/to/favicon-192.png" sizes="192x192" type="image/png">
QQ 浏览器(X5 内核)
<!-- 设置锁定横屏、竖屏显示模式,portrait(横屏),landscape(竖屏)-->
<meta name="x5-orientation" content="portrait|landscape">
<!-- 设置全屏显示页面 -->
<meta name="x5-fullscreen" content="true">
<!-- 开启页面以应用模式显示(全屏显示等) -->
<meta name="x5-page-mode" content="app">
360浏览器
<!-- 设置 360 浏览器渲染模式:webkit 为极速内核,ie-comp 为 IE 兼容内核,ie-stand 为 IE 标准内核 -->
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<!-- 360 浏览器就会在读取到这个标签后,立即切换对应的极速核。 另外为了保险起见再加入 -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
UC 浏览器
<!-- 设置屏幕方向 -->
<!-- portrait 为横屏,landscape 为竖屏。-->
<meta name="screen-orientation" content="portrait|landscape">
<!-- 设置全屏 -->
<meta name="full-screen" content="yes">
