SEO: <button> vs <a> HTML tags [closed]

送分小仙女□ 提交于 2019-11-30 04:07:29

问题


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

Button tags

Use the button classes on an <a>, <button>, or <input> element.

[...]

Cross-browser rendering

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

Is this a good practice SEO-wise speaking?


回答1:


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.

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 [...]

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.




回答2:


As i know google doesn't click on buttons and this bad for SEO. because many buttons makes form submit or JavaScript execution and it's not useful. I can see it on google-analytics of my website. it's caching only a tags href's.



来源:https://stackoverflow.com/questions/19201420/seo-button-vs-a-html-tags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!