<分区>
似乎有大量的meta tags你可以设置。我猜其中一些比其他的更重要。
要提供的最重要的元标记是什么?为什么?
我什至需要元标记吗? (查看stackoverflow主页没有)
最佳答案
我知道这个问题很老了,但它仍然是谷歌的热门话题,所以我想我会给出一个更新的答案,包括流行的社交媒体网站。
我一般有四组元信息:
常规元信息 - 由搜索引擎和浏览器使用
<title>{{pageTitle}}</title>
<meta charset="utf-8"><!-- html5 version of http-equiv="Content-Type"... -->
<meta name="description" content="{{description}}">
<meta name="keywords" content="{{keywords}}">
<link rel="author" href="https://plus.google.com/{{googlePlusId}}" />
<link rel="canonical" href="{{pageUrl}}" />
Facebook 元信息 - 当有人分享您的网址时由 Facebook 使用
<meta property="og:url" content="{{pageUrl}}">
<meta property="og:image" content="{{imageUrl}}">
<meta property="og:description" content="{{description}}">
<meta property="og:title" content="{{pageTitle}}">
<meta property="og:site_name" content="{{siteTitle}}">
<meta property="og:see_also" content="{{homepageUrl}}">
Google+ 元信息 - 当有人分享您的网址时由 Google+ 使用
<meta itemprop="name" content="{{pageTitle}}">
<meta itemprop="description" content="{{description}}">
<meta itemprop="image" content="{{imageUrl}}">
注意:您实际上并不需要这些,Google+ 将退回到 Facebook 使用的开放图谱标签。
Twitter 元信息 - 当有人分享您的网址时由 Twitter 使用
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="{{pageUrl}}">
<meta name="twitter:title" content="{{pageTitle}}">
<meta name="twitter:description" content="{{description}}">
<meta name="twitter:image" content="{{imageUrl}}">
关于html - 我必须在我的网站中放置哪些重要的元标记?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1092329/