SEO:<按钮和GT; VS< A> HTML标签 [英] SEO: <button> vs <a> HTML tags

查看:170
本文介绍了SEO:<按钮和GT; VS< A> HTML标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立使用Twitter的引导项目。在文档它说:

I'm building a project using Twitter Bootstrap. In the documentation it's stated:

按钮代码

使用上的&LT键类;一> <按钮> <输入方式> 元素

[...]

跨浏览器的渲染

,我们强烈推荐使用<按钮方式> 元素尽可能确保匹配跨浏览器的渲染

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

这是一个很好的做法SEO明智的演讲?

Is this a good practice SEO-wise speaking?

推荐答案

SEO明智的,最好是使用&LT;因为搜索引擎不标记; A&GT通过按键输入也没有,而是寻找锚标记及其属性(HREF,标题)。所以,如果你链接到另一个网页,其中需要通过搜索引擎,它更有意义无论对于搜索引擎优化,并与问候语义使用锚标记被抓取的网站上。

SEO-wise it is best to use the <a> tag since search engines don't go through buttons nor input but rather look for anchor tags and their attributes (href, title). So if you're linking to another page on the website which needs to be crawled by search engines it makes more sense both for SEO and with regards to semantics to use an anchor tag.

在另一方面,如果你正在构建一种形式,它使得使用&LT更有意义;按钮&GT; &LT;输入&GT ; 在这种情况下,你应该遵循的文档中的建议

On the other hand if you're building a form, it makes much more sense to use the <button> or <input> and in this case, you should follow the recommendation in the documentation.

我相信文档中引用实际上应该说:

I believe the reference in the documentation should actually say:

[...]推荐使用元素的而不是输入
  元素
尽可能[...]

[...] recommend using the element instead of the input element whenever possible [...]

另外请注意,大多数表单元素,包括&LT;输入&GT; &LT;按钮&GT; 有浏览器的特定风格,有时难以/不可能改变没有JavaScript的Twitter的引导文件中,因此这条评论。

Also note that most form elements including <input> and <button> have browser specific styles that are sometimes hard/impossible to change without JavaScript hence this comment in the Twitter Bootstrap documentation.

这篇关于SEO:&LT;按钮和GT; VS&LT; A&GT; HTML标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆