【问题标题】:HTML Title on Google contains image alt textGoogle 上的 HTML 标题包含图片替代文字
【发布时间】:2015-06-22 12:49:42
【问题描述】:

我的网站有一个奇怪的情况,每当它出现在 Google 搜索上时,尽管不是 <title> 标记的一部分,但其中一张图片的替代文本也会显示。

在我的网站 (sparen.github.io) 上,我有以下标题:

    <head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">
    <title>Andrew Fan's Code Dump: The Embodiment of Code and Hacks (AFCDTECH)</title>
    <link rel="stylesheet" type="text/css" href="blah.css">
    <meta content="Andrew Fan's Code Dump: The Embodiment of Code and Hacks (AFCDTECH)"
      name="description">
    <meta name="keywords" content="Sparen, Touhou, Danmakufu, ph3, Tutorial, Script, Project">
    <meta name="viewport" content="initial-scale=1">
  <script>
  <!-- Removed Google Analytics stuff for purposes of StackOverflow Question-->
  </script>
  </head>
  <body id="mhome">
    <div class="yui-t1" id="top">
      <center><a href="http://sparen.github.io"><img alt="&quot;Site Logo&quot;" src="images/logo.png" style="width:90%"></a></center>

但是,在 Google 搜索中,标题显示如下:

***这实际上是一个不同的页面,但我网站上的所有页面似乎都有相同的问题,并且都具有相同的标题结构。

我不知道为什么它有那个额外的“网站徽标”,它只作为图片替代文本的一部分出现在我的横幅中(甚至不在头部,而是在页面的正文中)。

在过去的几个月里它并没有消失,很高兴知道在我最初构建我的网站时是否有什么我从未考虑过的事情,或者 BlueGriffon 在我离开它之前是否做过什么事情。

【问题讨论】:

    标签: html google-search


    【解决方案1】:

    Google 似乎对您在替代文本中的引号感到困惑。只需删除它们或使用

    <img alt='"Site Logo"' src="images/logo.png" style="width:90%">
    

    我错了还是这可能是 Google 搜索中的一个缺陷(漏洞?)?

    【讨论】:

    • 我真的不知道 - BlueGriffon 添加了引号。我会尝试删除“看看能不能解决什么问题。
    • w3 验证器声明我的网站(受影响的部分)是合规的,现在 Google 搜索似乎将完全不同文件中的文本推送到搜索条目标题中,因为引号已经消失。我想要么我做错了什么,要么存在某种漏洞。在过去的几个月里,我一直在修复所有问题,但它仍然表现得很奇怪。
    猜你喜欢
    • 2010-10-28
    • 1970-01-01
    • 1970-01-01
    • 2021-11-19
    • 1970-01-01
    • 1970-01-01
    • 2016-08-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多